mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
-- 项目时间限制
This commit is contained in:
@@ -102,6 +102,7 @@
|
|||||||
separator="至"
|
separator="至"
|
||||||
:show-time="{ format: 'HH:mm' }"
|
:show-time="{ format: 'HH:mm' }"
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
|
:disabled-date="disabledDate"
|
||||||
v-model:value="projectInfo.rangeTime"
|
v-model:value="projectInfo.rangeTime"
|
||||||
style="width: 100%; height: 40px; border-radius: 5px"
|
style="width: 100%; height: 40px; border-radius: 5px"
|
||||||
valueFormat="YYYY-MM-DD HH:mm"
|
valueFormat="YYYY-MM-DD HH:mm"
|
||||||
@@ -286,6 +287,7 @@ import { changeOwnership, scrollLoad } from "@/api/method";
|
|||||||
import { storage } from "../../api/storage";
|
import { storage } from "../../api/storage";
|
||||||
import * as api2 from "../../api/indexAudit";
|
import * as api2 from "../../api/indexAudit";
|
||||||
import { validateName } from "@/api/index1";
|
import { validateName } from "@/api/index1";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectAdd",
|
name: "projectAdd",
|
||||||
@@ -506,9 +508,13 @@ export default {
|
|||||||
state.projectInfo.sourceBelongId = d
|
state.projectInfo.sourceBelongId = d
|
||||||
state.projectInfo.sourceBelongName = t
|
state.projectInfo.sourceBelongName = t
|
||||||
}
|
}
|
||||||
|
const disabledDate = (current) => {
|
||||||
|
return current && current < dayjs().startOf('day');
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
|
disabledDate,
|
||||||
managerChange,
|
managerChange,
|
||||||
timeChange,
|
timeChange,
|
||||||
classificationChange,
|
classificationChange,
|
||||||
|
|||||||
@@ -93,6 +93,7 @@
|
|||||||
:disabled-date="disabledDate" :disabled-time="disabledRangeTime"
|
:disabled-date="disabledDate" :disabled-time="disabledRangeTime"
|
||||||
separator="至"
|
separator="至"
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
|
:disabled-date="disabledDate"
|
||||||
v-model:value="projectInfo.rangeTime"
|
v-model:value="projectInfo.rangeTime"
|
||||||
style="width: 100%; height: 40px; border-radius: 5px"
|
style="width: 100%; height: 40px; border-radius: 5px"
|
||||||
valueFormat="YYYY-MM-DD HH:mm"
|
valueFormat="YYYY-MM-DD HH:mm"
|
||||||
@@ -244,6 +245,7 @@ import TrainClass from "@/components/project/TrainClass";
|
|||||||
import NameInput from "@/components/project/NameInput";
|
import NameInput from "@/components/project/NameInput";
|
||||||
import OrgClass from "@/components/project/OrgClass";
|
import OrgClass from "@/components/project/OrgClass";
|
||||||
import {validateName} from "../../api/index1";
|
import {validateName} from "../../api/index1";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectAdd",
|
name: "projectAdd",
|
||||||
@@ -391,9 +393,13 @@ export default {
|
|||||||
state.projectInfo.sourceBelongId = d
|
state.projectInfo.sourceBelongId = d
|
||||||
state.projectInfo.sourceBelongName = t
|
state.projectInfo.sourceBelongName = t
|
||||||
}
|
}
|
||||||
|
const disabledDate = (current) => {
|
||||||
|
return current && current < dayjs().startOf('day');
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
|
disabledDate,
|
||||||
managerChange,
|
managerChange,
|
||||||
timeChange,
|
timeChange,
|
||||||
projectPic,
|
projectPic,
|
||||||
|
|||||||
Reference in New Issue
Block a user