Commit dc8707c7 authored by 姬鋆屾's avatar 姬鋆屾

parent 0f0ecfe3
...@@ -24,8 +24,13 @@ export default { ...@@ -24,8 +24,13 @@ export default {
delete this.query.year; delete this.query.year;
} }
if (this.query.createTimeMonth == undefined) { if (this.query.createTimeMonth == undefined) {
delete this.query.createTimeStart; if (this.query.createTimeStart1 || this.query.createTimeEnd1) {
delete this.query.createTimeEnd; this.query.createTimeEnd = this.query.createTimeEnd1;
this.query.createTimeStart = this.query.createTimeStart1;
} else {
delete this.query.createTimeStart;
delete this.query.createTimeEnd;
}
} }
this.getData(); this.getData();
}, },
...@@ -80,7 +85,7 @@ export default { ...@@ -80,7 +85,7 @@ export default {
return; return;
} }
this.tableData.loading = true; this.tableData.loading = true;
console.log(this.query);
this.$post(this.pageInfo.list, this.query, { this.$post(this.pageInfo.list, this.query, {
cancelToken: this.source.token, cancelToken: this.source.token,
}) })
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
v-if="item.type === 'date' && !item.valueFormat" v-if="item.type === 'date' && !item.valueFormat"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择日期" :placeholder="item.label ? item.label : '选择日期'"
> >
</el-date-picker> </el-date-picker>
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
v-if="item.type === 'date' && item.valueFormat" v-if="item.type === 'date' && item.valueFormat"
type="date" type="date"
:value-format="item.valueFormat" :value-format="item.valueFormat"
placeholder="选择日期" :placeholder="item.label ? item.label : '选择日期'"
> >
</el-date-picker> </el-date-picker>
...@@ -352,6 +352,9 @@ export default { ...@@ -352,6 +352,9 @@ export default {
if (this.form.createTimeMonth) { if (this.form.createTimeMonth) {
this.form.createTimeStart = this.form.createTimeMonth + "-01"; this.form.createTimeStart = this.form.createTimeMonth + "-01";
this.form.createTimeEnd = this.form.createTimeMonth + "-31"; this.form.createTimeEnd = this.form.createTimeMonth + "-31";
} else if (this.form.createTimeStart1 || this.form.createTimeEnd1) {
this.form.createTimeStart = this.form.createTimeStart1;
this.form.createTimeEnd = this.form.createTimeEnd1;
} else { } else {
this.form.createTimeStart = undefined; this.form.createTimeStart = undefined;
this.form.createTimeEnd = undefined; this.form.createTimeEnd = undefined;
...@@ -397,18 +400,24 @@ export default { ...@@ -397,18 +400,24 @@ export default {
let data = this.decode(params); let data = this.decode(params);
// Object.assign({}, query, data) // Object.assign({}, query, data)
console.log({
...query,
...data,
});
if (!query.yearmonth) { if (!query.yearmonth) {
query.year = undefined; query.year = undefined;
query.month = undefined; query.month = undefined;
} }
if (!query.createTimeMonth) { if (!query.createTimeMonth) {
query.createTimeEnd = undefined; if (query.createTimeStart1 || query.createTimeEnd1) {
query.createTimeStart = undefined; query.createTimeEnd = query.createTimeEnd1;
query.createTimeStart = query.createTimeStart1;
} else {
query.createTimeEnd = undefined;
query.createTimeStart = undefined;
}
} }
console.log({
...query,
...data,
});
this.$router.push({ this.$router.push({
path: path, path: path,
query: { query: {
......
...@@ -94,13 +94,13 @@ export default { ...@@ -94,13 +94,13 @@ export default {
label: "请假类型", label: "请假类型",
}, },
{ {
name: "createTimeStart", name: "createTimeStart1",
type: "date", type: "date",
label: "开始时间", label: "开始时间",
fuzzy: false, fuzzy: false,
}, },
{ {
name: "createTimeEnd", name: "createTimeEnd1",
type: "date", type: "date",
label: "结束时间", label: "结束时间",
fuzzy: false, fuzzy: false,
......
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