mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
--fix bug 重复数据
This commit is contained in:
@@ -136,13 +136,14 @@
|
||||
import { defineEmits, defineProps, ref } from "vue";
|
||||
import { Form, message } from "ant-design-vue";
|
||||
import dayjs from "dayjs";
|
||||
import {useResetRef} from "@/utils/useCommon";
|
||||
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
taskList: []
|
||||
})
|
||||
const visible = ref(false)
|
||||
const formData = ref({
|
||||
const formData = useResetRef({
|
||||
activityName: '',
|
||||
activityNotice: '',
|
||||
activityStartTime: '',
|
||||
@@ -195,22 +196,14 @@ const rulesRef = ref({
|
||||
],
|
||||
});
|
||||
|
||||
const { resetFields, validate } = Form.useForm(formData, rulesRef);
|
||||
const { validate } = Form.useForm(formData, rulesRef);
|
||||
|
||||
const closeDrawer = () => {
|
||||
visible.value = false
|
||||
taskIndex.value = -1
|
||||
dateTime.value = []
|
||||
resetFields()
|
||||
formData.reset()
|
||||
};
|
||||
/**
|
||||
const range = (start, end) => {
|
||||
const result = [];
|
||||
for (let i = start; i < end; i++) {
|
||||
result.push(i);
|
||||
}
|
||||
return result;
|
||||
};*/
|
||||
|
||||
function timeChange(time, timeStr) {
|
||||
formData.value.activityStartTime = timeStr[0]
|
||||
@@ -220,14 +213,7 @@ function timeChange(time, timeStr) {
|
||||
const disabledDate = (current) => {
|
||||
return current && current < dayjs().startOf('day');
|
||||
};
|
||||
/**
|
||||
const disabledRangeTime = () => ({
|
||||
// disabledHours: () => range(0, 24).splice(4, 20),
|
||||
disabledMinutes: () => range(30, 60),
|
||||
disabledSeconds: () => [55, 56],
|
||||
});
|
||||
|
||||
*/
|
||||
async function confirm() {
|
||||
// debugger
|
||||
await validate().catch(({ errorFields }) => {
|
||||
|
||||
Reference in New Issue
Block a user