fix:日志开始/结束时间选择时不能超过当前时间

This commit is contained in:
shijing 2024-08-01 11:04:26 +08:00
parent e6b945b152
commit cc0c0bc6d4
1 changed files with 8 additions and 2 deletions

View File

@ -112,6 +112,7 @@
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
style="width: 100%"
:disabledDate="disabledDateFn"
/>
</el-form-item>
</el-col>
@ -123,6 +124,7 @@
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
style="width: 100%"
:disabledDate="disabledDateFn"
/>
</el-form-item>
</el-col>
@ -225,9 +227,10 @@ export default {
computed: {
title() {
return this.titleMap[this.mode];
}
},
},
emits: ["success", "closed"],
data() {
return {
loading: false,
@ -290,9 +293,12 @@ export default {
this.getEquipment();
},
methods: {
disabledDateFn(time) {
return time.getTime() > new Date().getTime();
},
//
getUser() {
this.$API.system.user.list.req({depts: this.dept}).then((res) => {
this.$API.system.user.list.req({ depts: this.dept }).then((res) => {
this.userOptions = res.results;
});
},