Sfoglia il codice sorgente

[FE]修改进出记录界面

xiayu3 4 anni fa
parent
commit
3b46b5a167

+ 4 - 1
security-protection-platform/src/api/access/index.js

@ -15,8 +15,11 @@ const api = {
15 15
  // 获取公司
16 16
  getcompanyTypesList () {
17 17
    return $default.get('sp/employeeManagement/queryCompanyList')
18
  },
19
  // 获取仪表记录列表
20
  getAildenLogList(params) {
21
    return $default.get('/sp/aiIdenLogManagement/queryPageAiIdenLog?', params)
18 22
  }
19

20 23
}
21 24

22 25
export default api

+ 9 - 32
security-protection-platform/src/modules/access/component/tab2/index.vue

@ -162,18 +162,18 @@ export default {
162 162
      },
163 163
      // 公司列表
164 164
      companyTypesList: [],
165
166 165
      // 查询的参数
166
      searchParams: {
167
        typeId: 'NOM',
168
        modelId: 'INSTRUMENT'
169
      },
167 170
      searchdata: {
168
169 171
        nameAsLike: '',
170 172
        beginDay: '',
171 173
        endDay: ''
172 174
      },
173 175
      // 一页的数据
174
      data: [
175
176
      ],
176
      data: [],
177 177
      // 当前页
178 178
      page: 1,
179 179
      limit: 10,
@ -282,54 +282,31 @@ export default {
282 282
        this.page = 1
283 283
      }
284 284
    },
285
    // 获取进出类型
286
    // gettype () {
287
    //   accessapi.getaccesstype().then((res) => {
288
    //     this.accesstype = res.data.data
289
    //     console.log(this.accesstype)
290
    //   })
291
    // },
292
    // 查询数据
285
    // 查询仪表记录数据
293 286
    async search () {
294 287
      // 检验数据
295 288
      var flag = this.startreend(this.searchdata.beginDay, this.searchdata.endDay)
296 289
      if (flag) {
297
        // console.log(this.page)
298
        // console.log(this.searchdata)
299
300
        var params = this.searchdata
301
        params.pageNumber = this.page
302
        params.pageSize = this.limit
303
        // console.log(params)
304
        var res = await accessapi.getaccesslist({ params: params })
305
        // console.log(res)
290
        var params = this.searchParams
291
        var res = await accessapi.getAildenLogList({ params: params })
306 292
        if (res.status === 200) {
307
          // console.log(res)
293
          console.log(res)
308 294
          this.data = res.data.data.data
309 295
          // console.log(this.data)
310 296
          // console.log(this.companyTypesList)
311 297
          this.data = this.data.map((item) => {
312 298
            // 处理进出时间
313
            // item.taskExecuteTime = formatDateTime(item.taskExecuteTime)
314
            // 处理相似度
315
            // item.simi = this.percentagedata(item.simi)
316
            // console.log('公司的数据是', this.companyTypesList)
317
            // console.log('公司id', item.companyId, typeof item.companyId)
318
            // console.log('公司名字是', this.companyTypesList.filter((item1) => { return item1.id === 10000 }))
319 299
            item.companyinfo = this.companyTypesList.filter((item1) => { return String(item1.id) === item.companyId })
320 300
            if (item.companyinfo.length > 0) {
321 301
              item.companyname = item.companyinfo[0].name
322 302
            } else {
323 303
              item.companyname = ''
324 304
            }
325
326 305
            return item
327 306
          })
328 307
329 308
          // this.total = Math.ceil(res.data.data.total / res.data.data.size) * 5
330
          // console.log(this.total)
331 309
          this.total = res.data.data.total
332
          // console.log('数据是', this.data)
333 310
        }
334 311
      } else {
335 312
        this.$Message.danger('开始时间不能在结束时间的后面')

security-protection-platform/src/modules/access/component/tab1/index.vue → security-protection-platform/src/modules/access/component/io-record/index.vue


+ 8 - 8
security-protection-platform/src/modules/access/index.vue

@ -1,22 +1,22 @@
1 1
<template>
2 2
  <t-tabs :animated="false" style="padding:20px">
3
    <t-tab-panel label="导航页1" panel-id="tab-1">
4
      <tab-change1></tab-change1>
3
    <t-tab-panel label="进出记录" panel-id="tab-1">
4
      <io-record></io-record>
5 5
    </t-tab-panel>
6
    <t-tab-panel label="导航页2" panel-id="tab-2">
7
      <tab-change2></tab-change2>
6
    <t-tab-panel label="仪表记录" panel-id="tab-2">
7
      <instrument-record></instrument-record>
8 8
    </t-tab-panel>
9 9
  </t-tabs>
10 10
</template>
11 11

12 12
<script>
13
import tabChange1 from './component/tab1'
14
import tabChange2 from './component/tab2'
13
import ioRecord from './component/io-record'
14
import instrumentRecord from './component/instrumentRecord'
15 15

16 16
export default {
17 17
  components: {
18
    tabChange1,
19
    tabChange2
18
    ioRecord,
19
    instrumentRecord
20 20
  },
21 21
  data () {
22 22
    return {