样式优化

master
fanluyan 1 year ago
parent 6df8ca53ce
commit 754020a90f

@ -263,20 +263,20 @@ export default {
},
},
created() {
// const thirtyDaysAgo = new Date();
// this.$set(
// this.formdata,
// "starttime",
// new Date(thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30))
// );
// console.log(this.formdata.starttime);
// const currentDate = new Date(); //
// currentDate.setHours(23); // 23
// currentDate.setMinutes(59); // 59
// currentDate.setSeconds(59); // 59
// this.$set(this.formdata, "endtime", currentDate);
// console.log("", this.formdata.starttime);
// console.log("", currentDate);
const thirtyDaysAgo = new Date();
this.$set(
this.formdata,
"starttime",
new Date(thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30))
);
console.log(this.formdata.starttime);
const currentDate = new Date(); //
currentDate.setHours(23); // 23
currentDate.setMinutes(59); // 59
currentDate.setSeconds(59); // 59
this.$set(this.formdata, "endtime", currentDate);
console.log("我是开始时间", this.formdata.starttime);
console.log("我是结束时间", currentDate);
this.treeData = [];
this.getSubNodes();
},
@ -387,7 +387,11 @@ export default {
this.formdata.endtime = endDate;
console.log(this.formdata.endtime);
} else {
val.setHours(23); // 23
val.setMinutes(59); // 59
val.setSeconds(59); // 59
this.formdata.endtime = val;
console.log(val);
}
},
getAllTimeTable() {

@ -124,7 +124,11 @@ export default {
comment: "",
//typeVal: 2,
},
rules: {},
rules: {
comment: [
{ required: true, message: "请输入属性描述", trigger: "blur" },
],
},
};
},
created() {},
@ -183,31 +187,38 @@ export default {
},
//
submitAddForm() {
console.log(this.formInfo);
modevtypepointAddApi({
modevtypeId: this.rowData.id,
field: this.formInfo.name,
fieldDesc: this.formInfo.comment,
//type: this.formInfo.typeVal,
})
.then((res) => {
console.log(res);
this.$refs.formInfo.validate((valid) => {
if (valid) {
console.log(this.formInfo);
modevtypepointAddApi({
modevtypeId: this.rowData.id,
field: this.formInfo.name,
fieldDesc: this.formInfo.comment,
//type: this.formInfo.typeVal,
})
.then((res) => {
console.log(res);
if (res.success) {
this.innerVisible = false;
this.getListAll();
} else {
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: res.errorMsg,
if (res.success) {
this.innerVisible = false;
this.getListAll();
} else {
this.$message({
duration: 1500,
showClose: true,
type: "error",
message: res.errorMsg,
});
}
})
.catch((err) => {
console.log(err); //
});
}
})
.catch((err) => {
console.log(err); //
});
} else {
console.log("error submit!!");
return false;
}
});
},
//
handleDeleteClick(val) {

Loading…
Cancel
Save