总结统计-日期改变时调用接口

init
zhusiyu 3 years ago
parent db7b353880
commit 1bcd17b23c

@ -181,7 +181,7 @@
this.spinning = false
if (result[0].data.code === 2000) {
this.chartsOption = result[0].data.data.option
console.log('每日领用对比数据', result[0])
//console.log('', result[0])
this.buildEcharts()
}
})

@ -62,6 +62,7 @@
totalRecordJson: {},
spinning: true,
selectTabIndexChild: 1,
searchTimeData: '',
}
},
watch: {
@ -81,7 +82,7 @@
searchTime: {
handler(time) {
if (time !== "") {
this.searchTime = time;
this.searchTimeData = time;
this.getNowTime();
}
},
@ -94,7 +95,10 @@
methods: {
//-
workSummaryDeptOverview() {
let timeStr = this.searchTime;
if (this.searchTimeData == '') {
this.searchTimeData = this.searchTime
}
let timeStr = this.searchTimeData;
if (timeStr !== "") {
let startDate = timeStr.split("|")[0];
let endDate = timeStr.split("|")[1];
@ -147,6 +151,9 @@
},
//-
workSummaryOrgOverview() {
if (this.searchTimeData == '') {
this.searchTimeData = this.searchTime
}
let timeStr = this.searchTime;
if (timeStr !== "") {
let startDate = timeStr.split("|")[0];
@ -213,7 +220,7 @@
let day = resData.data.day;
this.begin_date = moment(year + "-" + month + "-01");
this.end_date = moment(year + "-" + month + "-" + day);
this.searchTime = this.begin_date + "|" + this.end_date;
this.searchTimeData = this.begin_date + "|" + this.end_date;
this.workSummaryDeptOverview()
this.workSummaryOrgOverview()
}

@ -100,7 +100,7 @@
end_date: "",
totalRecordJson: {},
spinning: true,
dataSearchTime: this.searchTime,
dataSearchTime: '',
}
},
mounted() {
@ -123,6 +123,9 @@
methods: {
//-
workSummaryPersonOverview() {
if (this.dataSearchTime === '') {
this.dataSearchTime = this.searchTime
}
let timeStr = this.dataSearchTime;
if (timeStr !== "") {
let startDate = timeStr.split("|")[0];

@ -476,12 +476,12 @@
},
selected_data: {
handler(select_data) {
if (select_data.length == 0) {
this.deptId = this.BaseConfig.person_info_my.dep_id;
} else {
if (select_data[select_data.length - 1].id) {
this.deptId = select_data[select_data.length - 1].id
this.workSummaryDeptPersonOverview()
this.workSummaryDeptCycleStatistics()
} else {
this.deptId = this.BaseConfig.person_info_my.dep_id;
}
},
immediate: true
@ -583,7 +583,7 @@
//
endDate(end_date) {
this.end_date = end_date;
this.searchTime = this.begin_date + "|" + this.end_date;
// this.searchTime = this.begin_date + "|" + this.end_date;
this.workSummaryDeptPersonOverview()
this.workSummaryOrgDeptOverview()
this.workSummaryDeptCycleStatistics()
@ -592,7 +592,7 @@
//
startDate(begin_date) {
this.begin_date = begin_date
this.searchTime = this.begin_date + "|" + this.end_date;
// this.searchTime = this.begin_date + "|" + this.end_date;
this.workSummaryDeptPersonOverview()
this.workSummaryOrgDeptOverview()
this.workSummaryDeptCycleStatistics()
@ -611,8 +611,8 @@
let year = resData.data.year;
let month = resData.data.month;
let day = resData.data.day;
this.begin_date = moment(year + "-" + month + "-01");
this.end_date = moment(year + "-" + month + "-" + day);
this.begin_date = moment(year + "-" + month + "-01")._i;
this.end_date = moment(year + "-" + month + "-" + day)._i;
this.searchTime = this.begin_date + "|" + this.end_date;
this.workSummaryDeptPersonOverview()
this.workSummaryOrgDeptOverview()

Loading…
Cancel
Save