增加时间默认值
This commit is contained in:
parent
f6c384e163
commit
2ca86860de
|
|
@ -324,10 +324,19 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
format(date) {
|
||||||
|
const y = date.getFullYear()
|
||||||
|
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
return `${y}-${m}-${day}`
|
||||||
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.sendTemp = [];
|
this.sendTemp = [];
|
||||||
|
|
@ -370,7 +379,10 @@ export default {
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.queryParams.time = [];
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.queryParams.keyWord = "";
|
this.queryParams.keyWord = "";
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
|
|
|
||||||
|
|
@ -476,7 +476,7 @@ export default {
|
||||||
const res = await getProjectInfoApi({ unitId: null, isApp: true })
|
const res = await getProjectInfoApi({ unitId: null, isApp: true })
|
||||||
console.log('🚀 ~ projectInfoList ~ res:', res)
|
console.log('🚀 ~ projectInfoList ~ res:', res)
|
||||||
if (res.data && res.data.length > 0) {
|
if (res.data && res.data.length > 0) {
|
||||||
this.projectIds = res.data.map(item => item.proId)
|
this.projectIds = res.data.map(item => item.projectId)
|
||||||
} else {
|
} else {
|
||||||
this.projectIds = []
|
this.projectIds = []
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -311,10 +311,20 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
this.getList();
|
this.getList();
|
||||||
this.initSelectData()
|
this.initSelectData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
format(date) {
|
||||||
|
const y = date.getFullYear()
|
||||||
|
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
return `${y}-${m}-${day}`
|
||||||
|
},
|
||||||
/** 转换菜单数据结构 */
|
/** 转换菜单数据结构 */
|
||||||
normalizer(node) {
|
normalizer(node) {
|
||||||
if (node.children && !node.children.length) {
|
if (node.children && !node.children.length) {
|
||||||
|
|
@ -385,7 +395,10 @@ export default {
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.queryParams.time = []
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
// this.resetForm("queryForm");
|
// this.resetForm("queryForm");
|
||||||
this.unitId=null;
|
this.unitId=null;
|
||||||
this.projectId=null;
|
this.projectId=null;
|
||||||
|
|
|
||||||
|
|
@ -658,9 +658,19 @@ export default {
|
||||||
if (this.$route.query.code) {
|
if (this.$route.query.code) {
|
||||||
this.queryParams.keyWord = this.$route.query.code
|
this.queryParams.keyWord = this.$route.query.code
|
||||||
}
|
}
|
||||||
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
format(date) {
|
||||||
|
const y = date.getFullYear()
|
||||||
|
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
return `${y}-${m}-${day}`
|
||||||
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.maCodeList = []
|
this.maCodeList = []
|
||||||
|
|
@ -709,7 +719,10 @@ export default {
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.queryParams.time = []
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
// this.resetForm('queryForm')
|
// this.resetForm('queryForm')
|
||||||
this.queryParams.taskStatus = ''
|
this.queryParams.taskStatus = ''
|
||||||
this.queryParams.keyWord = ''
|
this.queryParams.keyWord = ''
|
||||||
|
|
|
||||||
|
|
@ -361,12 +361,22 @@ export default {
|
||||||
if(this.$route.query.code){
|
if(this.$route.query.code){
|
||||||
this.queryParams.keyWord=this.$route.query.code
|
this.queryParams.keyWord=this.$route.query.code
|
||||||
}
|
}
|
||||||
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
this.getList();
|
this.getList();
|
||||||
// this.initSelectData()
|
// this.initSelectData()
|
||||||
// this.InitIGetInfo()
|
// this.InitIGetInfo()
|
||||||
},
|
},
|
||||||
components: { vueEasyPrint },
|
components: { vueEasyPrint },
|
||||||
methods: {
|
methods: {
|
||||||
|
format(date) {
|
||||||
|
const y = date.getFullYear()
|
||||||
|
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
return `${y}-${m}-${day}`
|
||||||
|
},
|
||||||
//人员信息
|
//人员信息
|
||||||
InitIGetInfo() {
|
InitIGetInfo() {
|
||||||
getInfo().then((res) => {
|
getInfo().then((res) => {
|
||||||
|
|
@ -399,7 +409,10 @@ export default {
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.queryParams.time = []
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
// this.resetForm("queryForm");
|
// this.resetForm("queryForm");
|
||||||
this.$refs.queryForm.resetFields()
|
this.$refs.queryForm.resetFields()
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
|
|
|
||||||
|
|
@ -316,9 +316,19 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
format(date) {
|
||||||
|
const y = date.getFullYear()
|
||||||
|
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
|
return `${y}-${m}-${day}`
|
||||||
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.passTemp = [];
|
this.passTemp = [];
|
||||||
|
|
@ -366,7 +376,10 @@ export default {
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.queryParams.time = [];
|
const end = new Date()
|
||||||
|
let start = new Date()
|
||||||
|
start.setMonth(start.getMonth() - 2)
|
||||||
|
this.queryParams.time = [this.format(start), this.format(end)]
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.queryParams.keyword = "";
|
this.queryParams.keyword = "";
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue