Selaa lähdekoodia

[FE]:日报回显数据修改

xiayu3 4 vuotta sitten
vanhempi
commit
734f7cc4ce

+ 29 - 7
security-protection-platform/src/modules/attendance/report/index.vue

@ -15,6 +15,7 @@
15 15
            </div>
16 16
            <div class="search-btn">
17 17
              <t-button color="primary" @click="handSearchDay">查询</t-button>
18
              <t-button @click="resetDailyData">重置</t-button>
18 19
            </div>
19 20
          </div>
20 21
          <t-table :data="dailyTableData" :loading="loadDailyTable" size="sm" line class="table-detail">
@ -34,8 +35,8 @@
34 35
        <!-- 月报 -->
35 36
        <t-tab-panel label="月报" panel-id="tab-2">
36 37
          <div class="row mt-32">
37
            <div class="col-3">
38
              <span>月份:</span>
38
            <div class="keep-row">
39
              <span>月份</span>
39 40
              <t-date-picker v-model="monthlyForm.month" style="width:200px" type="month" placeholder="请选择月份"></t-date-picker>
40 41
            </div>
41 42
            <div class="keep-row">
@ -44,6 +45,7 @@
44 45
            </div>
45 46
            <div class="search-btn">
46 47
              <t-button color="primary" @click="handSearchMonth">查询</t-button>
48
              <t-button @click="resetMonthData">重置</t-button>
47 49
            </div>
48 50
          </div>
49 51
          <t-button class="export-excel" color="primary">
@ -147,16 +149,12 @@ export default {
147 149
      }
148 150
    }
149 151
  },
150
  mounted () {
151
    this.getDailyTable()
152
  },
153 152
  methods: {
154 153
    handleDailyInited () {
155
      this.getDailyTable()
154
      // this.getDailyTable()
156 155
    },
157 156
    changeTabs (tabName) {
158 157
      this.tabName = tabName
159
      this.getMonthTable()
160 158
    },
161 159
    // 搜索
162 160
    handSearchDay () {
@ -176,6 +174,30 @@ export default {
176 174
      this.monthlyForm.current = val
177 175
      this.getMonthTable()
178 176
    },
177
    // 重置日报数据
178
    resetDailyData() {
179
      let now = new Date()
180
      this.dailyForm = {
181
        workDay: formatDateTime(now, 'yyyy-MM-dd'),
182
        userid: null,
183
        depId: '',
184
        orgId: '',
185
        current: 1,
186
        pageSize: 10
187
      }
188
    },
189
    // 重置月报数据
190
    resetMonthData() {
191
      let now = new Date()
192
      this.monthlyForm = {
193
        month: formatDateTime(new Date().setMonth(now.getMonth() - 1), 'yyyy-MM'),
194
        userid: null,
195
        depId: '',
196
        orgId: '',
197
        current: 1,
198
        pageSize: 10
199
      }
200
    },
179 201
    // 获得月报表格数据
180 202
    getMonthTable () {
181 203
      this.loadMonthTable = true