mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 18:22:55 +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) => {
|
||||
|
||||
Reference in New Issue
Block a user