diff --git a/src/views/modules/staff/profile/componments/query-form/index.vue b/src/views/modules/staff/profile/componments/query-form/index.vue index a43b95a..23493cf 100644 --- a/src/views/modules/staff/profile/componments/query-form/index.vue +++ b/src/views/modules/staff/profile/componments/query-form/index.vue @@ -92,16 +92,21 @@ export default { beforeMount () { }, created () { this.handleGetMenuList() + this.handleChangeData({ + Month: 3, + title: '近三个月' + }) }, mounted () { }, methods: { - handleChangeData (data) { + async handleChangeData (data) { this.index = data.Month this.title = data.title let dataList = getDataForMonth(data.Month) this.formInline.value = dataList - this.formInline.beginDate = data[0] - this.formInline.endDate = data[1] + this.formInline.beginDate = dataList[0] + this.formInline.endDate = dataList[1] + this.onSubmit() }, changeData (data) { this.index = null @@ -119,7 +124,6 @@ export default { departmentId: this.formInline.departmentId, beginDate: this.formInline.beginDate, endDate: this.formInline.endDate - } let monthLetter = { index: this.index, diff --git a/src/views/modules/staff/profile/index.vue b/src/views/modules/staff/profile/index.vue index cded16e..4292543 100644 --- a/src/views/modules/staff/profile/index.vue +++ b/src/views/modules/staff/profile/index.vue @@ -48,7 +48,6 @@ export default { computed: {}, beforeMount () { }, mounted () { - this.initData() }, methods: { async handleGetEmployeessItuation (data = {}) { @@ -68,10 +67,6 @@ export default { this.$message.error(result.mgs) } }, - // 获取页面数据 - async initData () { - await this.handleGetEmployeessItuation() - }, submit (data, monthLetter) { this.monthLetter = monthLetter this.handleGetEmployeessItuation(data)