增加时间默认值
This commit is contained in:
parent
f6c384e163
commit
2ca86860de
|
|
@ -324,10 +324,19 @@ export default {
|
|||
};
|
||||
},
|
||||
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();
|
||||
},
|
||||
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) {
|
||||
this.sendTemp = [];
|
||||
|
|
@ -370,7 +379,10 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
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.queryParams.keyWord = "";
|
||||
this.handleQuery();
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ export default {
|
|||
const res = await getProjectInfoApi({ unitId: null, isApp: true })
|
||||
console.log('🚀 ~ projectInfoList ~ res:', res)
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.projectIds = res.data.map(item => item.proId)
|
||||
this.projectIds = res.data.map(item => item.projectId)
|
||||
} else {
|
||||
this.projectIds = []
|
||||
}
|
||||
|
|
|
|||
|
|
@ -311,10 +311,20 @@ export default {
|
|||
}
|
||||
},
|
||||
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.initSelectData()
|
||||
},
|
||||
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) {
|
||||
if (node.children && !node.children.length) {
|
||||
|
|
@ -385,7 +395,10 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
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.unitId=null;
|
||||
this.projectId=null;
|
||||
|
|
|
|||
|
|
@ -658,9 +658,19 @@ export default {
|
|||
if (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()
|
||||
},
|
||||
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) {
|
||||
this.maCodeList = []
|
||||
|
|
@ -709,7 +719,10 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
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.queryParams.taskStatus = ''
|
||||
this.queryParams.keyWord = ''
|
||||
|
|
|
|||
|
|
@ -361,12 +361,22 @@ export default {
|
|||
if(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.initSelectData()
|
||||
// this.InitIGetInfo()
|
||||
},
|
||||
components: { vueEasyPrint },
|
||||
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() {
|
||||
getInfo().then((res) => {
|
||||
|
|
@ -399,7 +409,10 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
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.$refs.queryForm.resetFields()
|
||||
this.handleQuery()
|
||||
|
|
|
|||
|
|
@ -316,9 +316,19 @@ export default {
|
|||
};
|
||||
},
|
||||
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();
|
||||
},
|
||||
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) {
|
||||
this.passTemp = [];
|
||||
|
|
@ -366,7 +376,10 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
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.queryParams.keyword = "";
|
||||
this.handleQuery();
|
||||
|
|
|
|||
Loading…
Reference in New Issue