mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-08 10:26:44 +08:00
时间
This commit is contained in:
@@ -419,7 +419,7 @@
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup lang="jsx">
|
||||
import {defineProps, ref, nextTick, computed,defineEmits,onMounted } from "vue";
|
||||
import {defineProps, ref, nextTick, computed,defineEmits,onMounted, watch } from "vue";
|
||||
import {Form, message} from "ant-design-vue";
|
||||
import FJUpload from "@/components/common/FJUpload";
|
||||
import CheckBox from "@/components/common/CheckBox";
|
||||
@@ -804,7 +804,7 @@ const del = (id,record) => {
|
||||
};
|
||||
|
||||
async function coursePlanConfirm() {
|
||||
|
||||
|
||||
if(!dateTime.value[0]){
|
||||
message.info('开始时间未填写')
|
||||
return
|
||||
@@ -843,6 +843,10 @@ async function coursePlanConfirm() {
|
||||
message.info('请选择开始时间和结束时间')
|
||||
return
|
||||
}
|
||||
if(durationText.value<0){
|
||||
message.info('结束时间不能小于开始时间,请重新填写')
|
||||
return
|
||||
}
|
||||
await validate().catch(({ errorFields }) => {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
throw Error("数据校验不通过");
|
||||
@@ -918,13 +922,17 @@ const range = (start, end) => {
|
||||
}
|
||||
return result;
|
||||
};
|
||||
const disabledDate = (current) => current && current < dayjs(dateTime.value[0]);
|
||||
// const disabledDate = (current) => current && current < dayjs(dateTime.value[0]);
|
||||
const disabledDateTime = () => {
|
||||
const currentMinute = dayjs(dateTime.value[0]).minute();
|
||||
return {
|
||||
disabledHours: () => range(0, dayjs(dateTime.value[0]).hour()).splice(0, dayjs(dateTime.value[0]).hour()),
|
||||
disabledMinutes: () => range(0, currentMinute+1).splice(0, currentMinute+1),
|
||||
};
|
||||
// const dateOnlyStart = new Date(dateTime.value[0].split(' ')[0]);
|
||||
// const dateOnlyEnd = new Date(dateTime.value[1].split(' ')[0]);
|
||||
// if(dateOnlyStart.getTime()==dateOnlyEnd.getTime()){
|
||||
// const currentMinute = dayjs(dateTime.value[0]).minute();
|
||||
// return {
|
||||
// disabledHours: () => range(0, dayjs(dateTime.value[0]).hour()).splice(0, dayjs(dateTime.value[0]).hour()),
|
||||
// disabledMinutes: () => range(0, currentMinute+1).splice(0, currentMinute+1),
|
||||
// };
|
||||
// }
|
||||
};
|
||||
// 删除文件返回参数
|
||||
const changevalue = (e) => {
|
||||
|
||||
@@ -3842,7 +3842,7 @@ function onFocusEnd(){
|
||||
state.onceName = "";
|
||||
state.xjkkinputV2 = "";
|
||||
state.duration = "";
|
||||
state.xjkkinputV3 = [];
|
||||
// state.xjkkinputV3 = [];
|
||||
state.xjkkinputV4 = null;
|
||||
state.checked1 = false;
|
||||
state.checked4 = false;
|
||||
@@ -3922,6 +3922,9 @@ function onFocusEnd(){
|
||||
if(!state.xjkkinputV3[1]){
|
||||
return message.error("结束时间未填写");
|
||||
}
|
||||
if(durationText.value<0){
|
||||
return message.error("结束时间不能小于开始时间,请重新填写");
|
||||
}
|
||||
if(state.offteachers.some(item => !item.teacherName)){
|
||||
return message.error("请填写教师名称和设置权重");
|
||||
}
|
||||
@@ -5072,14 +5075,20 @@ function onFocusEnd(){
|
||||
console.log("执行");
|
||||
getTableDate();
|
||||
};
|
||||
const disabledDate = (current) => current && current < dayjs(state.xjkkinputV3[0]);
|
||||
const disabledDate = (current) => {
|
||||
// current && current < dayjs(state.xjkkinputV3[0])
|
||||
};
|
||||
|
||||
const disabledDateTime = () => {
|
||||
const currentMinute = dayjs(state.xjkkinputV3[0]).minute();
|
||||
return {
|
||||
disabledHours: () => range(0, dayjs(state.xjkkinputV3[0]).hour()).splice(0, dayjs(state.xjkkinputV3[0]).hour()),
|
||||
disabledMinutes: () => range(0, currentMinute+1).splice(0, currentMinute+1),
|
||||
};
|
||||
// const dateOnlyStart = new Date(state.xjkkinputV3[0].split(' ')[0]);
|
||||
// const dateOnlyEnd = new Date(state.xjkkinputV3[1].split(' ')[0]);
|
||||
// if(dateOnlyStart.getTime()==dateOnlyEnd.getTime()){
|
||||
// const currentMinute = dayjs(state.xjkkinputV3[0]).minute();
|
||||
// return {
|
||||
// disabledHours: () => range(0, dayjs(state.xjkkinputV3[0]).hour()).splice(0, dayjs(state.xjkkinputV3[0]).hour()),
|
||||
// disabledMinutes: () => range(0, currentMinute+1).splice(0, currentMinute+1),
|
||||
// };
|
||||
// }
|
||||
};
|
||||
|
||||
function auditStudent(record) {
|
||||
|
||||
Reference in New Issue
Block a user