Bladeren bron

Merge remote-tracking branch 'origin/master'

wangchao 4 jaren geleden
bovenliggende
commit
a105a12509

+ 3 - 2
ebc-middle-platform/src/conf/services.js

@ -160,6 +160,7 @@ export default {
160 160
    // GET_TOKEN: '/gisParam/gisToken',
161 161
    GET_MAP_PARAM: '/gisParam/seaMapParam',
162 162
    GET_MAP_TAG: '/mapTag/queryPageMapTagInfo', // 查询地图标记信息
163
    GET_MAP_TAG1: '/mapTag/queryPageMapTagInfo', // 查询地图标记信息
163 164
    GET_ALL_MAP_TAG: '/mapTag/queryAllMapTagInfo', // 查询地图标记信息
164 165
    GET_ONE_MAP_TAG: '/mapTag/queryOneMapTagInfo', // 查询地图标记信息
165 166
    ADD_MAP_TAG: '/mapTag/addMapTagInfo', // 新增地图标记信息
@ -198,8 +199,8 @@ export default {
198 199
    GET_MORE_TRACE: '/trackManagement/queryMoreEmployeeTrace' // 多人轨迹回放
199 200
  },
200 201
  areaInOutRecord: {
201
    GET_ATTENDANCE: '/areaInOutRecord/queryPageAttendanceCount', // 分页查询考勤统计分析
202
    GET_ATTENDANCE_DETAILE: '/areaInOutRecord/queryPageAttendanceRecordDetaile' // 分页查询考勤统计分析
202
    GET_ATTENDANCE: '/AttendanceManage/queryAttendanceInfo', // 分页查询考勤统计分析
203
    GET_ATTENDANCE_DETAILE: '/AttendanceManage/queryAttendanceDetailsInfo' // 分页查询考勤统计分析
203 204
  },
204 205
  excel: {
205 206
    EXPROT_MAP_TAG: '/ExportToExcel/exportMapTagInfoToExcel' // 导出地图标记信息

+ 105 - 107
ebc-middle-platform/src/modules/attendance/attendance.vue

@ -35,10 +35,10 @@
35 35
    </div>
36 36
    <div>
37 37
      <t-table :data="table.data">
38
        <t-table-column prop="userName" label="姓名"></t-table-column>
39
        <t-table-column prop="duty" label="职务"></t-table-column>
40
        <t-table-column v-if="queryCondition.currentIndex === 0" prop="IN_DATE" label="打卡时间"></t-table-column>
41
        <t-table-column v-if="queryCondition.currentIndex !== 0" prop="gateDays" label="出勤天数(天)"></t-table-column>
38
        <t-table-column prop="name" label="姓名"></t-table-column>
39
        <t-table-column prop="mainJobPositionId" label="职务"></t-table-column>
40
        <t-table-column v-if="queryCondition.currentIndex === 0" :formatter="time_formatter" prop="goToWorkTime" label="打卡时间"></t-table-column>
41
        <t-table-column v-if="queryCondition.currentIndex !== 0" prop="clockingDays" label="出勤天数(天)"></t-table-column>
42 42
        <t-table-column
43 43
          v-if="queryCondition.currentIndex === 1"
44 44
          fixed="right"
@ -78,8 +78,8 @@
78 78
      </div>
79 79
      <div>
80 80
        <t-table :data="modalData.table">
81
          <t-table-column prop="date" label="日期"></t-table-column>
82
          <t-table-column prop="printTime" label="打卡时间" ></t-table-column>
81
          <t-table-column prop="workDay" label="日期"></t-table-column>
82
          <t-table-column :formatter="time_formatter" prop="goToWorkTime" label="打卡时间" ></t-table-column>
83 83
        </t-table>
84 84
      </div>
85 85
    </t-modal>
@ -92,17 +92,17 @@
92 92
      </div>
93 93
      <div>
94 94
        <t-table :data="monthModalData.table.data">
95
          <t-table-column prop="date" label="日期"></t-table-column>
96
          <t-table-column prop="printTime" label="打卡时间" ></t-table-column>
95
          <t-table-column prop="workDay" label="日期"></t-table-column>
96
          <t-table-column :formatter="time_formatter" prop="goToWorkTime" label="打卡时间" ></t-table-column>
97 97
        </t-table>
98
        <t-pager :total="monthModalData.table.pager.total" :current.sync="monthModalData.table.pager.currentPage"
99
                 :page-size.sync="monthModalData.table.pager.size"
100
                 :sizer-range="[10,20,50]"
101
                 class="px-24 pt-16 float-right"
102
                 show-elevator show-sizer
103
                 @on-size-change="onModalSizeChange"
104
                 @on-change="onModalPagerChange">
105
        </t-pager>
98
<!--        <t-pager :total="monthModalData.table.pager.total" :current.sync="monthModalData.table.pager.currentPage"-->
99
<!--                 :page-size.sync="monthModalData.table.pager.size"-->
100
<!--                 :sizer-range="[10,20,50]"-->
101
<!--                 class="px-24 pt-16 float-right"-->
102
<!--                 show-elevator show-sizer-->
103
<!--                 @on-size-change="onModalSizeChange"-->
104
<!--                 @on-change="onModalPagerChange">-->
105
<!--        </t-pager>-->
106 106
      </div>
107 107
    </t-modal>
108 108
  </div>
@ -163,9 +163,10 @@ export default {
163 163
  methods: {
164 164
    changeType(index) {
165 165
      this.queryCondition.currentIndex = index
166
      if (this.queryCondition.singleDateVal == '') {
167
        this.queryCondition.singleDateVal = this.getTime(2)
168
      }
166
      // if (this.queryCondition.singleDateVal == '') {
167
      //
168
      // }
169
      this.queryCondition.singleDateVal = this.getTime(2)
169 170
      this.queryCondition.dateType = !(index === 2)
170 171
      this.getList()
171 172
    },
@ -191,63 +192,44 @@ export default {
191 192
      this.getList()
192 193
    },
193 194
    getList() {
194
      this.table.data = [{
195
        userName: '周杰',
196
        duty: '员工',
197
        IN_DATE: '2020-11-25 10:57:02',
198
        gateDays: 5
199
      }, {
200
        userName: '李雷',
201
        duty: '员工',
202
        IN_DATE: '2020-11-25 11:05:30',
203
        gateDays: 5
204
      }, {
205
        userName: '刘伟',
206
        duty: '员工',
207
        IN_DATE: '2020-11-25 11:03:04',
208
        gateDays: 5
209
      }, {
210
        userName: '韩梅梅',
211
        duty: '救援',
212
        IN_DATE: '2020-11-25 11:02:32',
213
        gateDays: 4
214
      }]
215
      this.table.pager.total = 10
216
      // var mark
217
      // if (this.queryCondition.currentIndex === 0) {
218
      //   mark = 'day'
219
      // } else if (this.queryCondition.currentIndex === 1) {
220
      //   mark = 'week'
221
      // } else {
222
      //   mark = 'month'
223
      // }
224
      // var params = new FormData()
225
      // params.append(
226
      //     'data',
227
      //     JSON.stringify({
228
      //       currentDate: this.queryCondition.singleDateVal,
229
      //       mark: mark,
230
      //       userName: this.queryCondition.alarmPerson,
231
      //       pageNum: this.table.pager.currentPage,
232
      //       pageSize: this.table.pager.size
233
      //     })
234
      // )
235
      // this.$test
236
      //     .post(services.areaInOutRecord.GET_ATTENDANCE, {
237
      //       currentDate: this.queryCondition.singleDateVal,
238
      //       mark: mark,
239
      //       userName: this.queryCondition.alarmPerson,
240
      //       pageNum: this.table.pager.currentPage,
241
      //       pageSize: this.table.pager.size
242
      //     })
243
      //     .then((res) => {
244
      //       // 请求成功处理...
245
      //       this.table.data = res.data.list
246
      //       this.table.pager.total = res.data.total
247
      //     })
248
      //     .catch((res) => {
249
      //       // 请求失败处理...
250
      //     })
195
      var mark
196
      if (this.queryCondition.currentIndex === 0) {
197
        mark = 'day'
198
        if (this.queryCondition.singleDateVal == ''){
199
          this.queryCondition.singleDateVal = this.getTime(2)
200
        }
201
      } else if (this.queryCondition.currentIndex === 1) {
202
        mark = 'week'
203
        if (this.queryCondition.singleDateVal == ''){
204
          this.queryCondition.singleDateVal = this.getTime(2)
205
        }
206
      } else {
207
        mark = 'month'
208
        if (this.queryCondition.singleDateVal == '' || this.queryCondition.singleDateVal.length > 8 ){
209
          this.queryCondition.singleDateVal = this.getTime(1)
210
        }
211
      }
212
      var startDay = this.getBeforeDate(6, this.queryCondition.singleDateVal)
213
214
      this.$test
215
        .post(services.areaInOutRecord.GET_ATTENDANCE, {
216
          data: {
217
            mark: mark,
218
            currentDate: this.queryCondition.singleDateVal,
219
            startDay: startDay,
220
            userName: this.queryCondition.alarmPerson
221
          },
222
          pageNumber: this.table.pager.currentPage,
223
          pageSize: this.table.pager.size
224
        })
225
        .then((res) => {
226
          // 请求成功处理...
227
          this.table.data = res.data.data
228
          this.table.pager.total = res.data.total
229
        })
230
        .catch((res) => {
231
          // 请求失败处理...
232
        })
251 233
    },
252 234
    onSearch() {
253 235
      this.table.pager.currentPage = 1
@ -283,23 +265,24 @@ export default {
283 265
        data = this.queryCondition.singleDateVal
284 266
      }
285 267
      this.modalData.date = this.getBeforeDate(6, data) + ' ~ ' + data
268
      var beginDay = this.getBeforeDate(6, data)
286 269
      this.modalData.userName = row.userName
287 270
      this.modalData.duty = row.duty
288 271
      this.modalData.days = row.gateDays
289
      var params = new FormData()
290
      params.append(
291
        'data',
292
        JSON.stringify({
293
          EMPLOYEE_ID: row.EMPLOYEE_ID,
294
          mark: 'week',
295
          currentDate: this.queryCondition.singleDateVal
296
        })
297
      )
298 272
      this.$test
299
        .post(services.areaInOutRecord.GET_ATTENDANCE_DETAILE, params)
273
        .post(services.areaInOutRecord.GET_ATTENDANCE_DETAILE, {
274
          data:{
275
            id:row.id+"",
276
            mark:'week',
277
            beginDay:beginDay,
278
            endDay:this.queryCondition.singleDateVal
279
          },
280
          pageNumber:0,
281
          pageSize:0
282
        })
300 283
        .then((res) => {
301 284
          // 请求成功处理...
302
          this.modalData.table = res.data.list
285
          this.modalData.table = res.data
303 286
        })
304 287
        .catch((res) => {
305 288
          // 请求失败处理...
@ -316,31 +299,40 @@ export default {
316 299
      this.monthModalData.duty = row.duty
317 300
      this.monthModalData.days = row.gateDays
318 301
      this.monthModalData.EMPLOYEE_ID = row.EMPLOYEE_ID
319
      this.getMonthDetail()
320
    },
321
    getMonthDetail() {
322
      var params = new FormData()
323
      params.append(
324
        'data',
325
        JSON.stringify({
326
          EMPLOYEE_ID: this.monthModalData.EMPLOYEE_ID,
327
          mark: 'month',
328
          currentDate: this.queryCondition.singleDateVal,
329
          pageNum: this.monthModalData.table.pager.currentPage,
330
          pageSize: this.monthModalData.table.pager.size
331
        })
332
      )
333 302
      this.$test
334
        .post(services.areaInOutRecord.GET_ATTENDANCE_DETAILE, params)
303
        .post(services.areaInOutRecord.GET_ATTENDANCE_DETAILE, {
304
          data:{
305
            id:row.id+"",
306
            mark:'month',
307
            beginDay:this.queryCondition.singleDateVal,
308
            endDay:this.queryCondition.singleDateVal
309
          },
310
          pageNumber:0,
311
          pageSize:0
312
        })
335 313
        .then((res) => {
336 314
          // 请求成功处理...
337
          this.monthModalData.table.data = res.data.list
338
          this.monthModalData.table.pager.total = res.data.total
315
          this.monthModalData.table.data = res.data
316
          // this.monthModalData.table.pager.total = res.data.total
339 317
        })
340 318
        .catch((res) => {
341 319
          // 请求失败处理...
342 320
        })
343 321
    },
322
    getMonthDetail() {
323
      // var params = new FormData()
324
      // params.append(
325
      //   'data',
326
      //   JSON.stringify({
327
      //     EMPLOYEE_ID: this.monthModalData.EMPLOYEE_ID,
328
      //     mark: 'month',
329
      //     currentDate: this.queryCondition.singleDateVal,
330
      //     pageNum: this.monthModalData.table.pager.currentPage,
331
      //     pageSize: this.monthModalData.table.pager.size
332
      //   })
333
      // )
334
335
    },
344 336
    getTime(type) {
345 337
      var date = new Date()
346 338
      var year = date.getFullYear()
@ -358,12 +350,12 @@ export default {
358 350
    getBeforeDate(days, date) {
359 351
      var now
360 352
      if (date !== '') {
361
        var arr = date.split('-')
362
        now = new Date(arr[0], arr[1], arr[2]).getTime()
353
        // var arr = date.split('-')
354
        now = Date.parse(date)
363 355
      } else {
364 356
        now = new Date().getTime()
365 357
      }
366
      var ago = now - 186400000 * days // 一天的毫秒数为86400000
358
      var ago = now - 5118400000 // 一天的毫秒数为86400000
367 359
      var agoData = new Date(ago)
368 360
      var year = agoData.getFullYear()
369 361
      var mon = agoData.getMonth() + 1
@ -371,6 +363,12 @@ export default {
371 363
      mon = mon < 10 ? '0' + mon : mon
372 364
      day = day < 10 ? '0' + day : day
373 365
      return year + '-' + mon + '-' + day
366
    },
367
    time_formatter(row, column) {
368
      if (row.goToWorkTime){
369
        var json_date = new Date(row.goToWorkTime).toJSON()
370
        return new Date(new Date(json_date) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
371
      }
374 372
    }
375 373
  }
376 374
}

+ 3 - 3
ebc-middle-platform/src/modules/orientation/orientation.vue

@ -934,9 +934,9 @@ export default {
934 934
        this.trackMap.remove()
935 935
      }
936 936
      this.trackMap = new Ai.Map('track-map', {
937
        // ak: this.$store.getters.getGisToken,
938
        ak: 'MTYwNzQMTAwMU1UWXdOelE1TXpnME5EYzBOU015T0RFeE1UYz0_',
939
        center: [39.915599, 122.406568]
937
        ak: this.$store.getters.getGisToken,
938
        center: this.$store.getters.getMapParam.center,
939
        zoom: this.$store.getters.getMapParam.zoom
940 940
      })
941 941
      var maplayer = Ai.TileLayer(GIS_SEA_LAYER_URL)
942 942
      var la = Ai.WMTSLayer(GIS_SEA_URL, {opacity: 0.5})