样式优化

master
fanluyan 1 year ago
parent 6df8ca53ce
commit 754020a90f

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

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

Loading…
Cancel
Save