浏览代码

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

xiayu3 4 年之前
父节点
当前提交
734f7cc4ce
共有 1 个文件被更改,包括 29 次插入7 次删除
  1. 29 7
      security-protection-platform/src/modules/attendance/report/index.vue

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

15
            </div>
15
            </div>
16
            <div class="search-btn">
16
            <div class="search-btn">
17
              <t-button color="primary" @click="handSearchDay">查询</t-button>
17
              <t-button color="primary" @click="handSearchDay">查询</t-button>
18
              <t-button @click="resetDailyData">重置</t-button>
18
            </div>
19
            </div>
19
          </div>
20
          </div>
20
          <t-table :data="dailyTableData" :loading="loadDailyTable" size="sm" line class="table-detail">
21
          <t-table :data="dailyTableData" :loading="loadDailyTable" size="sm" line class="table-detail">
34
        <!-- 月报 -->
35
        <!-- 月报 -->
35
        <t-tab-panel label="月报" panel-id="tab-2">
36
        <t-tab-panel label="月报" panel-id="tab-2">
36
          <div class="row mt-32">
37
          <div class="row mt-32">
37
            <div class="col-3">
38
              <span>月份:</span>
38
            <div class="keep-row">
39
              <span>月份</span>
39
              <t-date-picker v-model="monthlyForm.month" style="width:200px" type="month" placeholder="请选择月份"></t-date-picker>
40
              <t-date-picker v-model="monthlyForm.month" style="width:200px" type="month" placeholder="请选择月份"></t-date-picker>
40
            </div>
41
            </div>
41
            <div class="keep-row">
42
            <div class="keep-row">
44
            </div>
45
            </div>
45
            <div class="search-btn">
46
            <div class="search-btn">
46
              <t-button color="primary" @click="handSearchMonth">查询</t-button>
47
              <t-button color="primary" @click="handSearchMonth">查询</t-button>
48
              <t-button @click="resetMonthData">重置</t-button>
47
            </div>
49
            </div>
48
          </div>
50
          </div>
49
          <t-button class="export-excel" color="primary">
51
          <t-button class="export-excel" color="primary">
147
      }
149
      }
148
    }
150
    }
149
  },
151
  },
150
  mounted () {
151
    this.getDailyTable()
152
  },
153
  methods: {
152
  methods: {
154
    handleDailyInited () {
153
    handleDailyInited () {
155
      this.getDailyTable()
154
      // this.getDailyTable()
156
    },
155
    },
157
    changeTabs (tabName) {
156
    changeTabs (tabName) {
158
      this.tabName = tabName
157
      this.tabName = tabName
159
      this.getMonthTable()
160
    },
158
    },
161
    // 搜索
159
    // 搜索
162
    handSearchDay () {
160
    handSearchDay () {
176
      this.monthlyForm.current = val
174
      this.monthlyForm.current = val
177
      this.getMonthTable()
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
    getMonthTable () {
202
    getMonthTable () {
181
      this.loadMonthTable = true
203
      this.loadMonthTable = true