|
|
@ -155,14 +155,9 @@
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="任务期限" prop="taskDeadline">
|
|
|
|
<el-form-item label="任务期限" prop="taskDeadline">
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker type="datetime" placeholder="选择日期" v-model="ruleForm.taskDeadline" style="width: 100%;"
|
|
|
|
type="datetime"
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" default-time="23:59:59"
|
|
|
|
placeholder="选择日期"
|
|
|
|
:picker-options="pickerOptions"></el-date-picker>
|
|
|
|
v-model="ruleForm.taskDeadline"
|
|
|
|
|
|
|
|
style="width: 100%;"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
|
|
default-time="23:59:59"
|
|
|
|
|
|
|
|
></el-date-picker>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item class="newTask-form-item">
|
|
|
|
<el-form-item class="newTask-form-item">
|
|
|
|
<el-button @click="resetForm('ruleForm')">取消</el-button>
|
|
|
|
<el-button @click="resetForm('ruleForm')">取消</el-button>
|
|
|
@ -193,6 +188,21 @@ export default {
|
|
|
|
components: { myPagination, myDialog, danweiList },
|
|
|
|
components: { myPagination, myDialog, danweiList },
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
pickerOptions: {
|
|
|
|
|
|
|
|
disabledDate(time) {
|
|
|
|
|
|
|
|
const date = new Date();
|
|
|
|
|
|
|
|
const oneday = date.getTime();
|
|
|
|
|
|
|
|
return time.getTime() < new Date().getTime() - 86400000;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
selectableRange: (() => {
|
|
|
|
|
|
|
|
let data = new Date();
|
|
|
|
|
|
|
|
let hour = data.getHours();
|
|
|
|
|
|
|
|
let minute = data.getMinutes();
|
|
|
|
|
|
|
|
let second = data.getSeconds();
|
|
|
|
|
|
|
|
return [`${hour}:${minute}:${second} - 23:59:59`]
|
|
|
|
|
|
|
|
})(),
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
btnloading: false,
|
|
|
|
btnloading: false,
|
|
|
|
formInline: {
|
|
|
|
formInline: {
|
|
|
|
name: "",
|
|
|
|
name: "",
|
|
|
@ -267,7 +277,12 @@ export default {
|
|
|
|
window.removeEventListener('resize', this.cancalDebounce);
|
|
|
|
window.removeEventListener('resize', this.cancalDebounce);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
disabledDate(time) {
|
|
|
|
|
|
|
|
// 禁用当前时间之前的时间选项
|
|
|
|
|
|
|
|
console.log(time);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return time.getTime() < Date.now() - 8.64e7; // 减去一天的毫秒数,以禁用当前日期之前的所有时间
|
|
|
|
|
|
|
|
},
|
|
|
|
checkboxChange() {
|
|
|
|
checkboxChange() {
|
|
|
|
console.log(111);
|
|
|
|
console.log(111);
|
|
|
|
this.ruleForm.dwmc = []
|
|
|
|
this.ruleForm.dwmc = []
|
|
|
@ -310,7 +325,7 @@ export default {
|
|
|
|
submitForm(formName) {
|
|
|
|
submitForm(formName) {
|
|
|
|
console.log(this.ruleForm.taskDeadline);
|
|
|
|
console.log(this.ruleForm.taskDeadline);
|
|
|
|
this.fonsisis(this.ruleForm.taskDeadline)
|
|
|
|
this.fonsisis(this.ruleForm.taskDeadline)
|
|
|
|
if(!this.fonsisis(this.ruleForm.taskDeadline)) {
|
|
|
|
if (!this.fonsisis(this.ruleForm.taskDeadline)) {
|
|
|
|
this.$message.error('选择时间不能小于当前时间');
|
|
|
|
this.$message.error('选择时间不能小于当前时间');
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|