Commit 43902461 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 62dc7fc2 8c733847
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
import Qs from "qs"; import Qs from "qs";
import { type } from "@/assets/utils"; import { type } from "@/assets/utils";
import { isArray } from "util"; import { isArray } from "util";
import { getFirstDay, getLastDay } from "@/assets/utils/dateFormat.js";
export default { export default {
props: { props: {
search: { search: {
...@@ -295,8 +295,21 @@ export default { ...@@ -295,8 +295,21 @@ export default {
} }
} }
if (this.form.summaryTimeStart && this.form.summaryTimeEnd) {
let startValue = Date.parse(this.form.summaryTimeStart);
let endValue = Date.parse(this.form.summaryTimeEnd);
if (startValue > endValue) {
this.$message.error("查询-结束的日期需大于开始日期");
this.form.summaryTimeEnd = "";
return false;
}
} else {
this.form.summaryTimeStart = getFirstDay();
this.form.summaryTimeEnd = getLastDay();
}
let params = JSON.parse(JSON.stringify(this.form)); //不更改原始数据 let params = JSON.parse(JSON.stringify(this.form)); //不更改原始数据
console.log(this.form,'form参数') console.log(this.form, "form参数");
let data = this.decode(params); let data = this.decode(params);
// Object.assign({}, query, data) // Object.assign({}, query, data)
this.$router.push({ this.$router.push({
...@@ -344,7 +357,6 @@ export default { ...@@ -344,7 +357,6 @@ export default {
let newData = { page: 1 }; let newData = { page: 1 };
Object.keys(data).forEach((item) => { Object.keys(data).forEach((item) => {
let val = data[item]; let val = data[item];
console.log(item,this.search)
this.search.forEach((obj) => { this.search.forEach((obj) => {
if ( if (
obj.name === item && obj.name === item &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment