Pārlūkot izejas kodu

Merge branch 'master' of http://10.1.235.20:3000/asiainfo/ebc

wangchao 4 gadi atpakaļ
vecāks
revīzija
a517b28942
30 mainītis faili ar 683 papildinājumiem un 210 dzēšanām
  1. 9 3
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/constant/MonitorManageConsts.java
  2. 21 12
      monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/impl/KafkaProcessImpl.java
  3. 23 1
      security-protection-platform/src/api/common/index.js
  4. 3 0
      security-protection-platform/src/api/system/index.js
  5. 4 1
      security-protection-platform/src/api/usermana/index.js
  6. 3 3
      security-protection-platform/src/layout/components/Sidebar/SidebarItem.vue
  7. 1 0
      security-protection-platform/src/layout/components/Sidebar/index.vue
  8. 69 6
      security-protection-platform/src/modules/access/index.vue
  9. 7 2
      security-protection-platform/src/modules/aialarm/index.vue
  10. 16 4
      security-protection-platform/src/modules/attendance/abnormal/index.vue
  11. 116 41
      security-protection-platform/src/modules/attendance/components/DeptStaffCascader/index.vue
  12. 86 4
      security-protection-platform/src/modules/attendance/report/index.vue
  13. 11 5
      security-protection-platform/src/modules/system/devicemana/components/modal/addDeviceModal.vue
  14. 12 2
      security-protection-platform/src/modules/system/monitor/HomePageSettings/ShiftCameraDialog.vue
  15. 157 51
      security-protection-platform/src/modules/usermana/components/modal/addUser.vue
  16. 19 5
      security-protection-platform/src/modules/usermana/index.vue
  17. 4 4
      security-protection-platform/src/modules/videoSurveillance/components/ReplayDialog/index.vue
  18. 27 7
      security-protection-platform/src/modules/videoSurveillance/distinguishRecord/index.vue
  19. 37 22
      security-protection-platform/src/modules/videoSurveillance/index.vue
  20. 2 1
      security-protection-platform/src/routes.js
  21. 2 1
      security-protection-service/src/main/java/com/ai/bss/security/protection/controller/AiIdenLogManageController.java
  22. 1 1
      security-protection-service/src/main/java/com/ai/bss/security/protection/controller/InAndOutRecordController.java
  23. 2 3
      security-protection-service/src/main/java/com/ai/bss/security/protection/controller/MonitorVideoLogManageController.java
  24. 5 3
      security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/AiAlarmManageServiceImpl.java
  25. 7 3
      security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/AiIdenLogManageServiceImpl.java
  26. 5 0
      security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/EmployeeManagementServiceImpl.java
  27. 21 12
      security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/MonitorVideoLogManageServiceImpl.java
  28. 1 1
      security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/AiIdenLogManageService.java
  29. 9 3
      security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/MonitorVideoLogManageService.java
  30. 3 9
      security-protection-service/src/main/java/com/ai/bss/security/protection/utils/EbcConstant.java

+ 9 - 3
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/constant/MonitorManageConsts.java

31
31
32
32
33
33
34
    //着装违规识别(是否带头盔)
35
    public static String AI_MODEL_CLOTHING_CODE = "CLOTHING_CODE";
34
    //安全帽识别
35
    public static String AI_MODEL_SAFETY_HELMET = "SAFETY_HELMET";
36
    //人脸识别
36
    //人脸识别
37
    public static String AI_MODEL_FACE = "FACE";
37
    public static String AI_MODEL_FACE = "FACE";
38
    //陌生人识别
38
    //陌生人识别
39
    public static String AI_MODEL_STRANGER = "STRANGER";
39
    public static String AI_MODEL_STRANGER = "STRANGER";
40
40
    //吸烟识别
41
    public static String AI_MODEL_SMOKE = "SMOKE";
42
    //工作服识别
43
    public static String AI_MODEL_CLOTHING_CODE = "CLOTHING_CODE"; 
44
    //仪表识别
45
    public static String AI_MODEL_INSTRUMENT = "INSTRUMENT";
46
    
41
47
42
    //AI识别结果:正常
48
    //AI识别结果:正常
43
    public static final String AI_IDENTIFY_RESULT= "NOM";
49
    public static final String AI_IDENTIFY_RESULT= "NOM";

+ 21 - 12
monitor-manage-service/src/main/java/com/ai/bss/monitorManage/service/impl/KafkaProcessImpl.java

116
				filePath.length());
116
				filePath.length());
117
		if (fileType.equals(MonitorManageConsts.FILE_TYPE_IMG)) {
117
		if (fileType.equals(MonitorManageConsts.FILE_TYPE_IMG)) {
118
			bucketName = minioConfig.getBucketAiImage();
118
			bucketName = minioConfig.getBucketAiImage();
119
			time = fileName.substring(3, 17);
120
			//dateTime = DateUtils.formatDate(DateUtils.convertDate(time, DateUtils.PURE_DATETIMEHHMM_PATTERN),
119
			//fileName:img202101121630016.png、img202101121630017.png、img202101121630018.png
120
			//time = fileName.substring(3, 17);
121
			//dateTime = DateUtils.formatDate(DateUtils.convertDate(time, DateUtils.PURE_DATETIME_PATTERN),
121
			//		DateUtils.NORM_DATETIME_PATTERN);
122
			//		DateUtils.NORM_DATETIME_PATTERN);
122
			// aiIdenLogDto.setTaskExecuteTime(DateUtils.getSysDateTime());
123
			dateTime = DateUtils.formatDate(DateUtils.convertDate(time, DateUtils.PURE_DATETIME_PATTERN),
123
			time = fileName.substring(3, 15);
124
			dateTime = DateUtils.formatDate(DateUtils.convertDate(time, DateUtils.PURE_DATETIMEHHMM_PATTERN),
124
					DateUtils.NORM_DATETIME_PATTERN);
125
					DateUtils.NORM_DATETIME_PATTERN);
125
			aiIdenLogDto.setTaskExecuteTime(StringUtils.isEmpty(dateTime) ? DateUtils.getSysDateTime() : dateTime);
126
			// aiIdenLogDto.setTaskExecuteTime(StringUtils.isEmpty(dateTime) ? DateUtils.getSysDateTime() : dateTime);
127
			aiIdenLogDto.setTaskExecuteTime(DateUtils.getSysDateTime());
126
			aiIdenLogDto.setIdenPictureSnapDate(dateTime);
128
			aiIdenLogDto.setIdenPictureSnapDate(dateTime);
127
		}
129
		}
128
		// 文件上传到 minio文件服务器
130
		// 文件上传到 minio文件服务器
129
		multipartFile = new CommonsMultipartFile(FileUtils.createFileItem(new File(filePath), fileName));
131
		multipartFile = new CommonsMultipartFile(FileUtils.createFileItem(new File(filePath), fileName));
130
132
131
		log.info("保存图片文件");
133
		log.info("保存图片文件:"+fileName);
132
		minioFileMap = fileManageService.uploadFile(multipartFile, bucketName, deviceCode, null);
134
		minioFileMap = fileManageService.uploadFile(multipartFile, bucketName, deviceCode, null);
133
135
134
		if (fileType.equals(MonitorManageConsts.FILE_TYPE_IMG)) {
136
		if (fileType.equals(MonitorManageConsts.FILE_TYPE_IMG)) {
157
					if (MonitorManageConsts.AI_MODEL_FACE.equals(aiIdenModel)) {
159
					if (MonitorManageConsts.AI_MODEL_FACE.equals(aiIdenModel)) {
158
						aiIdenLogDto = faceAiRecog(aiIdenLogDto, filePath);
160
						aiIdenLogDto = faceAiRecog(aiIdenLogDto, filePath);
159
161
160
					} else if (MonitorManageConsts.AI_MODEL_CLOTHING_CODE.equals(aiIdenModel)) {
162
					} else if (MonitorManageConsts.AI_MODEL_SAFETY_HELMET.equals(aiIdenModel)) {
161
						aiIdenLogDto = aiHelmetDetect(aiIdenLogDto, filePath);
163
						aiIdenLogDto = aiHelmetDetect(aiIdenLogDto, filePath);
162
164
163
					}
164
					/*else if (MonitorManageConsts.AI_MODEL_STRANGER.equals(aiIdenModel)) {
165
					}else if (MonitorManageConsts.AI_MODEL_SMOKE.equals(aiIdenModel)) {
166
						
167
						
168
					}else if (MonitorManageConsts.AI_MODEL_CLOTHING_CODE.equals(aiIdenModel)) {
169
						
165
						
170
						
166
					} else {
171
					}else if (MonitorManageConsts.AI_MODEL_INSTRUMENT.equals(aiIdenModel)) {
167
						
172
						
168
					}*/
173
						
174
					} else if (MonitorManageConsts.AI_MODEL_STRANGER.equals(aiIdenModel)){
175
						
176
						
177
					}
169
				}
178
				}
170
			}
179
			}
171
180
431
			}
440
			}
432
441
433
			resourceToolInfoList = JSON.parseArray(resultData.getString("data"), Map.class);
442
			resourceToolInfoList = JSON.parseArray(resultData.getString("data"), Map.class);
434
			log.info("getResourceToolAllInfo method return result: " + resultData.getString("data"));
443
			log.debug("getResourceToolAllInfo method return result: " + resultData.getString("data"));
435
		} catch (Exception e) {
444
		} catch (Exception e) {
436
			log.error("getResourceToolAllInfo is error");
445
			log.error("getResourceToolAllInfo is error");
437
		}
446
		}

+ 23 - 1
security-protection-platform/src/api/common/index.js

19
      return resp
19
      return resp
20
    })
20
    })
21
  },
21
  },
22
22
  // 获取公司类型列表
23
  getCompanyTypesList () {
24
    return $default.get('/sp/employeeManagement/queryCompanyList').then(resp => {
25
      return resp
26
    }).catch((err) => { return err })
27
  },
28
  // 获取部门类型列表
29
  queryCycleChildOrg (id) {
30
    return $default.get(`/sp/employeeManagement/queryCycleChildOrg?orgId=${id}`).then(resp => {
31
      const data = resp.data.data
32
      if (!Array.isArray(data)) return resp
33
      // 将平铺的数组变为树形数组
34
      resp.data = nest(data)
35
      return resp
36
    }).catch((err) => { return err })
37
  },
38
  // 获取员工列表
39
  getStaffTypesList (id) {
40
    return $default.get(`/sp/employeeManagement/queryEmployeeListByOrgId?orgId=${id}`).then(resp => {
41
      return resp
42
    }).catch((err) => { return err })
43
  },
44
  // 查询单个用户信息详情
23
  getEmployeeByOrgid (orgId) {
45
  getEmployeeByOrgid (orgId) {
24
    return $default
46
    return $default
25
      .get(`/sp/workEmployee/queryEmployeeByOrg?orgId=${orgId}`)
47
      .get(`/sp/workEmployee/queryEmployeeByOrg?orgId=${orgId}`)

+ 3 - 0
security-protection-platform/src/api/system/index.js

187
  },
187
  },
188
  getDepartments() {
188
  getDepartments() {
189
    return $default.get('/sp/workEmployee/queryAllOrganize')
189
    return $default.get('/sp/workEmployee/queryAllOrganize')
190
  },
191
  getListFileUrl(data) {
192
    return $default.get(`/sp/uploadFile/getListFileUrl?fileNameList=${data.join(',')}`)
190
  }
193
  }
191
}
194
}
192
195

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

66
  // 审核用户照片
66
  // 审核用户照片
67
  auditEmployeePicture (params) {
67
  auditEmployeePicture (params) {
68
    return $default.post('/sp/employeeManagement/auditEmployeePicture', params)
68
    return $default.post('/sp/employeeManagement/auditEmployeePicture', params)
69
  },
70
  // 编辑用户信息
71
  editUserDetail(params) {
72
    return $default.post('/sp/employeeManagement/modifyEmployee', params)
69
  }
73
  }
70
71
}
74
}
72
function nest (items, code = '-1', link = 'parentCode') {
75
function nest (items, code = '-1', link = 'parentCode') {
73
  return items.filter(item => item[link] === code).map(item => ({ ...item, departments: nest(items, item.code) }))
76
  return items.filter(item => item[link] === code).map(item => ({ ...item, departments: nest(items, item.code) }))

+ 3 - 3
security-protection-platform/src/layout/components/Sidebar/SidebarItem.vue

89
      const icon = onlyOneChild.meta && onlyOneChild.meta.icon ? <t-icon icon={onlyOneChild.meta.icon} /> : ''
89
      const icon = onlyOneChild.meta && onlyOneChild.meta.icon ? <t-icon icon={onlyOneChild.meta.icon} /> : ''
90
90
91
      if (item.path === '/alarm') {
91
      if (item.path === '/alarm') {
92
        var confirmedCount = 0
92
        // var confirmedCount = 0
93
        var unconfirmedCount = 0
93
        var unconfirmedCount = 0
94
        if (AiAlarmCount.length > 0) {
94
        if (AiAlarmCount.length > 0) {
95
          confirmedCount = AiAlarmCount[1].value
95
          // confirmedCount = AiAlarmCount[1].value
96
          unconfirmedCount = AiAlarmCount[0].value
96
          unconfirmedCount = AiAlarmCount[0].value
97
        }
97
        }
98
98
103
103
104
            <div class="badge-group">
104
            <div class="badge-group">
105
              <t-badge color="danger" count={unconfirmedCount} max={99} ></t-badge>
105
              <t-badge color="danger" count={unconfirmedCount} max={99} ></t-badge>
106
              <t-badge color="danger" count={confirmedCount} max={99} ></t-badge>
106
107
            </div>
107
            </div>
108
108
109
          </t-menu-item>
109
          </t-menu-item>

+ 1 - 0
security-protection-platform/src/layout/components/Sidebar/index.vue

78
      let res = await aialarmapi.getAiAlarmCount()
78
      let res = await aialarmapi.getAiAlarmCount()
79
79
80
      this.AiAlarmCount = res.data.data
80
      this.AiAlarmCount = res.data.data
81
      console.log('数据是', this.AiAlarmCount)
81
    }
82
    }
82
  }
83
  }
83
}
84
}

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

82
          <div class="detail_item1">
82
          <div class="detail_item1">
83
            <div>抓拍图片</div>
83
            <div>抓拍图片</div>
84
            <div>
84
            <div>
85
              <img :src="rowdata.pictureInfo.fileUrl" alt="" srcset="" style="width:100%;height:100%">
86

85
              <!-- <img :src="rowdata.pictureInfo.fileUrl" alt="" srcset="" style="width:100%;height:100%"> -->
86
              <!--处理图片里的方框-->
87
              <img :src="mainimage" alt="" srcset="" style="width:100%;height:100%">
87
            </div>
88
            </div>
88
          </div>
89
          </div>
89
          <div class="detail_item2">
90
          <div class="detail_item2">
104
              <div>
105
              <div>
105
                <!-- 修改-->
106
                <!-- 修改-->
106
                <img src="@/assets/images/Identify_the_successful.png" alt="" srcset="">
107
                <img src="@/assets/images/Identify_the_successful.png" alt="" srcset="">
108

107
              </div>
109
              </div>
108
              <div>
110
              <div>
109
                <img :src="rowdata.alarmInfo.headerImage" alt="" srcset="" style="width:100%;height:160px; border-radius: 5px;">
111
                <img :src="rowdata.alarmInfo.headerImage" alt="" srcset="" style="width:100%;height:160px; border-radius: 5px;">
185

187

186
      // }
188
      // }
187
      // 截取后的图片
189
      // 截取后的图片
188
      newimage: ''
190
      newimage: '',
191
      // 详情的主图片
192
      mainimage: ''
189

193

190
    }
194
    }
191
  },
195
  },
205
      // console.log('公司信息是', res)
209
      // console.log('公司信息是', res)
206
      if (res.status === 200) {
210
      if (res.status === 200) {
207
        this.companyTypesList = res.data.data
211
        this.companyTypesList = res.data.data
212
        console.log(this.companyTypesList)
208
        this.search()
213
        this.search()
209
      } else {
214
      } else {
210
        this.$Message.danger('获取数据失败')
215
        this.$Message.danger('获取数据失败')
215
      // this.rowdata = scope.row
220
      // this.rowdata = scope.row
216
      // console.log(this.rowdata)
221
      // console.log(this.rowdata)
217
      // console.log('id是', scope.row.aiIdenLogId)
222
      // console.log('id是', scope.row.aiIdenLogId)
223
      this.newimage = ''
224
      this.mainimage = ''
218
      var res = await accessapi.getOneInAndOutRecord({ params: { aiIdenLogId: scope.row.aiIdenLogId } })
225
      var res = await accessapi.getOneInAndOutRecord({ params: { aiIdenLogId: scope.row.aiIdenLogId } })
219

226

220
      if (res.data.success) {
227
      if (res.data.success) {
221
        // this.rowdata = res.data.data
228
        // this.rowdata = res.data.data
229

222
        this.rowdata.pictureInfo = res.data.data.pictureInfo
230
        this.rowdata.pictureInfo = res.data.data.pictureInfo
223
        console.log('数据', this.rowdata.pictureInfo)
231
        console.log('数据', this.rowdata.pictureInfo)
224
        this.rowdata.alarmInfo = res.data.data.alarmInfo
232
        this.rowdata.alarmInfo = res.data.data.alarmInfo
225
        console.log('数据', this.rowdata.alarmInfo)
233
        console.log('数据', this.rowdata.alarmInfo)
234
        console.log('相似度数据', this.rowdata.alarmInfo.simi, typeof this.rowdata.alarmInfo.simi)
226
        // this.rowdata.alarmInfo.newImg = this.rowdata.pictureInfo.fileUrl
235
        // this.rowdata.alarmInfo.newImg = this.rowdata.pictureInfo.fileUrl
227

236

228
        this.getImage()
237
        this.getImage()
238
        this.getmainimage()
229
        // var loadTimer
239
        // var loadTimer
230
        // var imgObject = new Image()
240
        // var imgObject = new Image()
231
        // imgObject.setAttribute('crossOrigin', 'anonymous')
241
        // imgObject.setAttribute('crossOrigin', 'anonymous')
291
        var params = this.searchdata
301
        var params = this.searchdata
292
        params.pageNumber = this.page
302
        params.pageNumber = this.page
293
        params.pageSize = this.limit
303
        params.pageSize = this.limit
294
        console.log(params)
304
        // console.log(params)
295
        var res = await accessapi.getaccesslist({ params: params })
305
        var res = await accessapi.getaccesslist({ params: params })
296
        // console.log(res)
306
        // console.log(res)
297
        if (res.status === 200) {
307
        if (res.status === 200) {
298
          // console.log(res)
308
          // console.log(res)
299
          this.data = res.data.data.data
309
          this.data = res.data.data.data
310
          // console.log(this.data)
311
          // console.log(this.companyTypesList)
300
          this.data = this.data.map((item) => {
312
          this.data = this.data.map((item) => {
301
            // 处理进出时间
313
            // 处理进出时间
302
            // item.taskExecuteTime = formatDateTime(item.taskExecuteTime)
314
            // item.taskExecuteTime = formatDateTime(item.taskExecuteTime)
303
            // 处理相似度
315
            // 处理相似度
304
            // item.simi = this.percentagedata(item.simi)
316
            // item.simi = this.percentagedata(item.simi)
305
            // console.log('公司的数据是', this.companyTypesList)
317
            // console.log('公司的数据是', this.companyTypesList)
306
            // console.log('公司id', item)
318
            // console.log('公司id', item.companyId, typeof item.companyId)
307
            // console.log('公司名字是', this.companyTypesList.filter((item1) => { return item1.id === 10000 }))
319
            // console.log('公司名字是', this.companyTypesList.filter((item1) => { return item1.id === 10000 }))
308
            item.companyinfo = this.companyTypesList.filter((item1) => { return item1.id === item.companyId })
320
            item.companyinfo = this.companyTypesList.filter((item1) => { return String(item1.id) === item.companyId })
309
            if (item.companyinfo.length > 0) {
321
            if (item.companyinfo.length > 0) {
310
              item.companyname = item.companyinfo[0].name
322
              item.companyname = item.companyinfo[0].name
311
            } else {
323
            } else {
360
        return true
372
        return true
361
      }
373
      }
362
    },
374
    },
375
    // 处理截图图片
363
    async getImage () {
376
    async getImage () {
364
      var loadTimer
377
      var loadTimer
365
      var imgObject = new Image()
378
      var imgObject = new Image()
392
        // console.log(tnCanvas.toDataURL())
405
        // console.log(tnCanvas.toDataURL())
393
        return tnCanvas.toDataURL()
406
        return tnCanvas.toDataURL()
394
      }
407
      }
408
    },
409

410
    // 处理主图片
411
    async getmainimage () {
412
      var that = this
413

414
      var x = this.rowdata.alarmInfo.face_box[0]
415
      var y = this.rowdata.alarmInfo.face_box[1]
416
      var width = this.rowdata.alarmInfo.face_box[2] - this.rowdata.alarmInfo.face_box[0]
417
      var height = this.rowdata.alarmInfo.face_box[3] - this.rowdata.alarmInfo.face_box[1]
418
      function getBase64Image (img) {
419
        var canvas = document.createElement('canvas')
420
        canvas.width = img.width
421
        canvas.height = img.height
422
        var ctx = canvas.getContext('2d')
423
        ctx.drawImage(img, 0, 0, img.width, img.height)
424
        ctx.beginPath()
425
        ctx.moveTo(x, y)
426
        ctx.lineTo(x + width, y)
427
        ctx.lineTo(x + width, y + height)
428
        ctx.lineTo(x, y + height)
429
        ctx.lineTo(x, y) // 绘制最后一笔使图像闭合
430
        ctx.lineWidth = 5
431
        ctx.strokeStyle = 'red'
432
        ctx.stroke()
433

434
        var dataURL = canvas.toDataURL('image/png') // 可选其他值 image/jpeg
435
        return dataURL
436
      }
437

438
      function main (src, cb) {
439
        var image = new Image()
440
        image.src = src + '?v=' + Math.random() // 处理缓存
441
        image.crossOrigin = '*' // 支持跨域图片
442
        image.onload = function () {
443
          var base64 = getBase64Image(image)
444
          cb && cb(base64)
445
        }
446
      }
447

448
      main(this.rowdata.pictureInfo.fileUrl, function (base64) {
449
        // console.log(base64, '是否成功打印base64')
450
        that.mainimage = base64
451
      })
395
    }
452
    }
453
    // //将分数转换为小数
454
    // toPoint (percent) {
455
    //   var str = percent.replace('%', '')
456
    //   str = str / 100
457
    //   return str
458
    // }
396

459

397
  }
460
  }
398
}
461
}

+ 7 - 2
security-protection-platform/src/modules/aialarm/index.vue

75
        <template slot-scope="scope">
75
        <template slot-scope="scope">
76

76

77
          <a href="javascript:void(0)" size="sm" style="color:#0089D4" @click="handleClick(scope,0)">详情</a>
77
          <a href="javascript:void(0)" size="sm" style="color:#0089D4" @click="handleClick(scope,0)">详情</a>
78
          <a v-if="scope.row.status=='RUN'||scope.row.status=='FAL'" style="color:#0089D4" @click="handleClick(scope,1)">关闭</a>
79
          <a v-if="scope.row.status=='INI'" style="color:#0089D4" @click="handleClick(scope,1)">处理</a>
78
          <div class="caozuo">
79
            <a v-if="scope.row.status=='RUN'||scope.row.status=='FAL'" style="color:#0089D4" @click="handleClick(scope,1)">关闭</a>
80
            <a v-if="scope.row.status=='INI'" style="color:#0089D4" @click="handleClick(scope,1)">处理</a>
81
          </div>
80
        </template>
82
        </template>
81
      </t-table-column>
83
      </t-table-column>
82
    </t-table>
84
    </t-table>
441
    font-size: 14px;
443
    font-size: 14px;
442
    line-height: 22px;
444
    line-height: 22px;
443
  }
445
  }
446
  .caozuo {
447
    display: inline;
448
  }
444
  .table th,
449
  .table th,
445
  .table td {
450
  .table td {
446
    padding: 0 0 0 21px;
451
    padding: 0 0 0 21px;

+ 16 - 4
security-protection-platform/src/modules/attendance/abnormal/index.vue

8
        </div>
8
        </div>
9
        <div class="keep-row">
9
        <div class="keep-row">
10
          <span>部门/员工:</span>
10
          <span>部门/员工:</span>
11
          <dept-staff-cascader v-model="form" @inited="handleInited" />
11
          <dept-staff-cascader v-model="form" @inited="handleInited" @getOrgId="getDailyOrgId" @getDepId="getDailyDepId" @getStaffId="getDailyStaffId" />
12
        </div>
12
        </div>
13
        <div class="search-btn">
13
        <div class="search-btn">
14
          <t-button color="primary" @click="handSearchAttendance">查询</t-button>
14
          <t-button color="primary" @click="handSearchAttendance">查询</t-button>
84
    const now = new Date()
84
    const now = new Date()
85
    return {
85
    return {
86
      form: {
86
      form: {
87
        month: formatDateTime(new Date().setMonth(now.getMonth() - 1), 'yyyy-MM'),
88
        userid: null,
89
        depId: '',
90
        orgId: '',
87
        current: 1,
91
        current: 1,
88
        pageSize: 10,
89
        month: formatDateTime(now.setMonth(now.getMonth() - 1), 'yyyy-MM')
92
        pageSize: 10
90
      },
93
      },
91
      total: 40,
94
      total: 0,
92
      attendanceModal: false,
95
      attendanceModal: false,
93
      agreement: '',
96
      agreement: '',
94
      tableData: [],
97
      tableData: [],
98
    }
101
    }
99
  },
102
  },
100
  methods: {
103
  methods: {
104
    getDailyOrgId(id) {
105
      this.form.orgId = id
106
    },
107
    getDailyDepId(id) {
108
      this.form.depId = id
109
    },
110
    getDailyStaffId(id) {
111
      this.form.userid = id
112
    },
101
    handleInited() {
113
    handleInited() {
102
      this.getTableData()
114
      this.getTableData()
103
    },
115
    },

+ 116 - 41
security-protection-platform/src/modules/attendance/components/DeptStaffCascader/index.vue

1
<template>
1
<template>
2
  <t-cascader v-model="staff" :data-source="source" :loader="loadStuffData" :change-on-select="true" />
2
  <div class="row">
3
    <div class="col-3">
4
      <t-select v-model="companyTypeId" width="200px" @change="getOrgId">
5
        <t-option v-for="item in companyTypesList" :key="item.id" :value="item.id">{{ item.name }}</t-option>
6
      </t-select>
7
    </div>
8
    <div class="col-3" style="margin-left:35px">
9
      <!-- <t-select v-model="departmentTypeId" width="200px">
10
            <t-option v-for="item in departmentTypesList" :key="item.id" :value="item.id">{{ item.name }}</t-option>
11
          </t-select> -->
12
      <template>
13
        <t-select-tree v-model="departmentTypeId" :node-data="departmentTypesList" width="200px" node-key="id" @change="getDepId"></t-select-tree>
14
      </template>
15
    </div>
16
    <div class="col-3" style="margin-left:35px">
17
      <t-select v-model="staffTypeId" width="200px" @change="getStaffId">
18
        <t-option v-for="item in staffTypesList" :key="item.id" :value="item.id">{{ item.name }}</t-option>
19
      </t-select>
20
    </div>
21
  </div>
3
</template>
22
</template>
4
23
5
<script>
24
<script>
6
import commonapi from '@/api/common'
25
import commonApi from '@/api/common'
7
export default {
26
export default {
8
  props: {
27
  props: {
9
    value: {
28
    value: {
15
  },
34
  },
16
  data() {
35
  data() {
17
    return {
36
    return {
18
      source: []
37
      source: [],
38
      // 公司、部门、员工、列表
39
      companyTypesList: [],
40
      departmentTypesList: [],
41
      staffTypesList: [],
42
      companyTypeId: '',
43
      departmentTypeId: '',
44
      staffTypeId: ''
19
    }
45
    }
20
  },
46
  },
21
  computed: {
47
  computed: {
30
      }
56
      }
31
    }
57
    }
32
  },
58
  },
59
  watch: {
60
    companyTypeId (val) {
61
      // 重置部门回显
62
      this.departmentTypeId = ''
63
      // 查询部门列表
64
      this.queryCycleChildOrg(val)
65
    },
66
    departmentTypeId (val) {
67
      // 重置人员回显
68
      this.staffTypeId = ''
69
      // 重置人员列表
70
      this.staffTypesList = []
71
      // 减少查询请求
72
      if (val !== '') {
73
        this.getStaffTypesList(val)
74
      }
75
    }
76
  },
33
  created() {
77
  created() {
34
    this.getDepartments()
78
    this.getCompanyTypesList()
35
  },
79
  },
36
  methods: {
80
  methods: {
37
38
    getDepartments() {
39
      commonapi.getDepartments().then(resp => {
40
        this.staff = []
41
42
        this.source = resp.data.map(item => {
43
          const children = item.departments.map(dept => {
44
            return {
45
              label: dept.name,
46
              value: dept.id,
47
              children: [],
48
              loading: false
81
    getOrgId() {
82
      console.log(123);
83
      this.$emit('getOrgId', this.companyTypeId)
84
    },
85
    getDepId() {
86
      this.$emit('getDepId', this.departmentTypeId)
87
    },
88
    getStaffId() {
89
      this.$emit('getStaffId', this.staffTypeId)
90
    },
91
    // 向服务器发送请求获取公司类型列表数据
92
    async getCompanyTypesList () {
93
      const res = await commonApi.getCompanyTypesList()
94
      if (res.status === 200) {
95
        this.companyTypesList = res.data.data
96
      } else {
97
        this.$Message.danger('公司类型列表数据获取失败!')
98
      }
99
    },
100
    // 获取部门列表
101
    async queryCycleChildOrg (id) {
102
      const res = await commonApi.queryCycleChildOrg(id)
103
      if (res.status === 200) {
104
        const data = []
105
        // 递归 实现tree组件所需部门数据结构
106
        this.nextDepartment(res.data, data)
107
        // 深拷贝data
108
        const data1 = JSON.parse(JSON.stringify(data))
109
        // 用部门id映射关系代替code与parentCode父子映射关系
110
        data.forEach(item => {
111
          // 删除pid为"-1"的的pid属性,否则tree渲染的时候没有根节点渲染不出来
112
          if (item.pid === '-1') {
113
            delete item.pid
114
          }
115
          item.id = item.orgId
116
          data1.some((item1) => {
117
            if (item.pid === item1.id) {
118
              item.pid = item1.orgId
119
            } else {
120
              return false
49
            }
121
            }
50
          })
122
          })
51
52
          children.unshift({
53
            label: '全部',
54
            value: item.id,
55
            children: [],
56
            loading: false
57
          })
58
59
          return {
123
        })
124
        // eslint-disable-next-line no-return-assign
125
        this.departmentTypesList = data.filter(item => item.data = item.id)
126
      } else {
127
        this.$Message.danger('部门类型列表数据获取失败!')
128
      }
129
    },
130
    // 向服务器发送请求获取用户类型列表数据
131
    async getStaffTypesList (id) {
132
      const res = await commonApi.getStaffTypesList(id)
133
      if (res.status === 200) {
134
        this.staffTypesList = res.data.data
135
      } else {
136
        this.$Message.danger('用户类型列表数据获取失败!')
137
      }
138
    },
139
    // 如果部门还有下级 递归
140
    nextDepartment (data, arr) {
141
      if (data.length > 0) {
142
        data.forEach(item => {
143
          arr.push({
144
            orgId: item.id + '',
145
            id: item.code,
60
            label: item.name,
146
            label: item.name,
61
            value: item.id,
62
            children
63
          }
147
            pid: item.parentCode
148
          })
149
          this.nextDepartment(item.departments, arr)
64
        })
150
        })
65
66
        // if (this.source.length > 0) {
67
        //   const orgId = this.source[0].value
68
        //   // const depId = this.source[0].children[0].value
69
        //   this.staff = [orgId]
70
        // }
71
72
        this.$emit('inited')
73
      }, err => {
74
        this.$Message.danger('获取部门列表失败!')
75
        console.log(err)
76
      })
151
      }
77
    },
152
    },
78
    loadStuffData(item, callback) {
153
    loadStuffData(item, callback) {
79
      item.loading = true
154
      item.loading = true
80
      commonapi.getEmployeeByOrgid(item.value).then(res => {
155
      commonApi.getEmployeeByOrgid(item.value).then(res => {
81
        console.log(res)
156
        console.log(res)
82
        let arr = []
157
        let arr = []
83
158

+ 86 - 4
security-protection-platform/src/modules/attendance/report/index.vue

11
            </div>
11
            </div>
12
            <div class="keep-row">
12
            <div class="keep-row">
13
              <span>部门/员工:</span>
13
              <span>部门/员工:</span>
14
              <dept-staff-cascader v-model="dailyForm" @inited="handleDailyInited" />
14
              <dept-staff-cascader v-model="dailyForm" @inited="handleDailyInited" @getOrgId="getDailyOrgId" @getDepId="getDailyDepId" @getStaffId="getDailyStaffId" />
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>
41
            </div>
41
            </div>
42
            <div class="keep-row">
42
            <div class="keep-row">
43
              <span>部门/员工:</span>
43
              <span>部门/员工:</span>
44
              <dept-staff-cascader v-model="monthlyForm" />
44
              <dept-staff-cascader v-model="monthlyForm" @getOrgId="getMonthOrgId" @getDepId="getMonthDepId" @getStaffId="getMonthStaffId" />
45
            </div>
45
            </div>
46
            <div class="search-btn">
46
            <div class="search-btn">
47
              <t-button color="primary" @click="handSearchMonth">查询</t-button>
47
              <t-button color="primary" @click="handSearchMonth">查询</t-button>
113
import formatDateTime from '@/utils/formatDateTime.js'
113
import formatDateTime from '@/utils/formatDateTime.js'
114
import AttendanceDialog from '../components/AttendanceDialog'
114
import AttendanceDialog from '../components/AttendanceDialog'
115
import DeptStaffCascader from '../components/DeptStaffCascader'
115
import DeptStaffCascader from '../components/DeptStaffCascader'
116
117
export default {
116
export default {
118
  components: { AttendanceDialog, DeptStaffCascader },
117
  components: { AttendanceDialog, DeptStaffCascader },
119
  data () {
118
  data () {
128
      loadDetail: false,
127
      loadDetail: false,
129
      loadDailyTable: false,
128
      loadDailyTable: false,
130
      loadMonthTable: false,
129
      loadMonthTable: false,
131
130
      // 公司、部门、员工、列表
131
      companyTypesList: [],
132
      departmentTypesList: [],
133
      getStaffTypesList: [],
132
      monthlyTotal: 0,
134
      monthlyTotal: 0,
133
      dailyTotal: 0,
135
      dailyTotal: 0,
134
      monthlyForm: {
136
      monthlyForm: {
150
    }
152
    }
151
  },
153
  },
152
  methods: {
154
  methods: {
155
    getDailyOrgId(id) {
156
      this.dailyForm.orgId = id
157
    },
158
    getDailyDepId(id) {
159
      this.dailyForm.depId = id
160
    },
161
    getDailyStaffId(id) {
162
      this.dailyForm.userid = id
163
    },
164
    getMonthOrgId(id) {
165
      this.monthlyForm.orgId = id
166
    },
167
    getMonthDepId(id) {
168
      this.monthlyForm.depId = id
169
    },
170
    getMonthStaffId(id) {
171
      this.monthlyForm.userid = id
172
    },
153
    handleDailyInited () {
173
    handleDailyInited () {
154
      // this.getDailyTable()
174
      // this.getDailyTable()
155
    },
175
    },
178
      this.monthlyForm.current = val
198
      this.monthlyForm.current = val
179
      this.getMonthTable()
199
      this.getMonthTable()
180
    },
200
    },
201
    // // 向服务器发送请求获取公司类型列表数据
202
    // async getCompanyTypesList () {
203
    //   const res = await commonApi.getCompanyTypesList()
204
    //   if (res.status === 200) {
205
    //     this.companyTypesList = res.data.data
206
    //   } else {
207
    //     this.$Message.danger('公司类型列表数据获取失败!')
208
    //   }
209
    // },
210
    // // 获取部门列表
211
    // async queryCycleChildOrg (id) {
212
    //   const res = await commonApi.queryCycleChildOrg(id)
213
    //   if (res.status === 200) {
214
    //     const data = []
215
    //     // 递归 实现tree组件所需部门数据结构
216
    //     this.nextDepartment(res.data, data)
217
    //     // 深拷贝data
218
    //     const data1 = JSON.parse(JSON.stringify(data))
219
    //     // 用部门id映射关系代替code与parentCode父子映射关系
220
    //     data.forEach(item => {
221
    //       // 删除pid为"-1"的的pid属性,否则tree渲染的时候没有根节点渲染不出来
222
    //       if (item.pid === '-1') {
223
    //         delete item.pid
224
    //       }
225
    //       item.id = item.orgId
226
    //       data1.some((item1) => {
227
    //         if (item.pid === item1.id) {
228
    //           item.pid = item1.orgId
229
    //         } else {
230
    //           return false
231
    //         }
232
    //       })
233
    //     })
234
    //     // eslint-disable-next-line no-return-assign
235
    //     this.departmentTypesList = data.filter(item => item.data = item.id)
236
    //   } else {
237
    //     this.$Message.danger('部门类型列表数据获取失败!')
238
    //   }
239
    // },
240
    // // 向服务器发送请求获取用户类型列表数据
241
    // async getStaffTypesList (id) {
242
    //   const res = await commonApi.getStaffTypesList(id)
243
    //   if (res.status === 200) {
244
    //     this.staffTypesList = res.data.data
245
    //   } else {
246
    //     this.$Message.danger('用户类型列表数据获取失败!')
247
    //   }
248
    // },
249
    // // 如果部门还有下级 递归
250
    // nextDepartment (data, arr) {
251
    //   if (data.length > 0) {
252
    //     data.forEach(item => {
253
    //       arr.push({
254
    //         orgId: item.id + '',
255
    //         id: item.code,
256
    //         label: item.name,
257
    //         pid: item.parentCode
258
    //       })
259
    //       this.nextDepartment(item.departments, arr)
260
    //     })
261
    //   }
262
    // },
181
    // 重置日报数据
263
    // 重置日报数据
182
    resetDailyData() {
264
    resetDailyData() {
183
      this.$nextTick(() => {
265
      this.$nextTick(() => {

+ 11 - 5
security-protection-platform/src/modules/system/devicemana/components/modal/addDeviceModal.vue

1
<template>
1
<template>
2
  <!-- 请假对话框 -->
2
  <!-- 请假对话框 -->
3
  <t-modal :visibled.sync="visibled" :mask-closable="false" width="600px" height="500px">
3
  <t-modal :visibled.sync="visibled" :mask-closable="false" width="600px" height="560px">
4
    <template slot="header">
4
    <template slot="header">
5
      <div class="device-modal-title">{{ isEdit?'设备编辑':'设备新增' }}</div>
5
      <div class="device-modal-title">{{ isEdit?'设备编辑':'设备新增' }}</div>
6
    </template>
6
    </template>
21
          <t-option v-for="item in types" :value="item.id" :key="item.id">{{ item.name }}</t-option>
21
          <t-option v-for="item in types" :value="item.id" :key="item.id">{{ item.name }}</t-option>
22
        </t-select>
22
        </t-select>
23
      </t-form-item>
23
      </t-form-item>
24
      <t-form-item label="视频地址:" prop="videoUrl">
25
        <t-input v-model="addDeviceModalForm.videoUrl" placeholder="请输入视频地址"></t-input>
26
      </t-form-item>
24
      <t-form-item label="图片上传:">
27
      <t-form-item label="图片上传:">
25
        <div style="display:flex;flex-direction:row">
28
        <div style="display:flex;flex-direction:row">
26
          <t-upload ref="uploader" :format="['jpg','jpeg','png']" :show-uploaded="false" :before-upload="$_onUploadBeforeUpload" :action="action" :data="{pictureUrl:addDeviceModalForm.pictureUrl}" name="picture" multiple type="drag" style="width:180px;height:180px" @success="$_onUploadSuccess" @remove-file="$_onUploadRemoveFile" @error="$_onUploadError" @file-ext-error="$_onUploadFormatError" @file-exceeded-size="$_onUploadExceededSize">
29
          <t-upload ref="uploader" :format="['jpg','jpeg','png']" :show-uploaded="false" :before-upload="$_onUploadBeforeUpload" :action="action" :data="{pictureUrl:addDeviceModalForm.pictureUrl}" multiple type="drag" style="width:180px;height:180px" @success="$_onUploadSuccess" @remove-file="$_onUploadRemoveFile" @error="$_onUploadError" @file-ext-error="$_onUploadFormatError" @file-exceeded-size="$_onUploadExceededSize">
27
            <div style="width: 180px;height:180px;line-height: 180px">
30
            <div style="width: 180px;height:180px;line-height: 180px">
28
              <t-icon icon="plus-outline" size="40"></t-icon>
31
              <t-icon icon="plus-outline" size="40"></t-icon>
29
            </div>
32
            </div>
46
  deviceId: '', // 设备id
49
  deviceId: '', // 设备id
47
  deviceName: '', // 设备名称
50
  deviceName: '', // 设备名称
48
  deviceTypeId: '', // 设备类型id
51
  deviceTypeId: '', // 设备类型id
52
  videoUrl: '', // 视频地址
49
  pictureUrl: '' // 图片标识
53
  pictureUrl: '' // 图片标识
50
}
54
}
51
export default {
55
export default {
79
        deviceName: [
83
        deviceName: [
80
          { required: true, message: '设备名称不能为空', trigger: 'blur' }
84
          { required: true, message: '设备名称不能为空', trigger: 'blur' }
81
        ],
85
        ],
86
        videoUrl: [
87
          { required: true, message: '视频地址不能为空', trigger: 'blur' }
88
        ],
82
        deviceTypeId: [
89
        deviceTypeId: [
83
          { required: true, message: '设备类型不能为空' }
90
          { required: true, message: '设备类型不能为空' }
84
        ]
91
        ]
187
      console.log(file)
194
      console.log(file)
188
    },
195
    },
189
    $_onUploadSuccess (res, file) {
196
    $_onUploadSuccess (res, file) {
190
      this.imgUrl = res.data.data.toolPictureUrl
191
      this.addDeviceModalForm.pictureUrl = res.data.data.pictureUrl
197
      this.imgUrl = res.data.toolPictureUrl
198
      this.addDeviceModalForm.pictureUrl = res.data.pictureUrl
192
      // 因为演示用的上传服务器返回数据格式的原因,这里模拟添加 url
199
      // 因为演示用的上传服务器返回数据格式的原因,这里模拟添加 url
193
      console.log(file)
194
      this.uploadList.push(file)
200
      this.uploadList.push(file)
195
    },
201
    },
196
    $_onUploadRemoveFile () { },
202
    $_onUploadRemoveFile () { },

+ 12 - 2
security-protection-platform/src/modules/system/monitor/HomePageSettings/ShiftCameraDialog.vue

30
          <div>
30
          <div>
31
            <img
31
            <img
32
              :class="item.resourceToolId == form.resourceToolId ? 'hover' : ''"
32
              :class="item.resourceToolId == form.resourceToolId ? 'hover' : ''"
33
              :src="item.pictureUrl"
33
              :src="item.imageUrl"
34
              style="height: 120px; width: 158px"
34
              style="height: 120px; width: 158px"
35
              alt=""
35
              alt=""
36
            />
36
            />
129
        nameAsLike: this.searchValue // 设备名称(模糊匹配)
129
        nameAsLike: this.searchValue // 设备名称(模糊匹配)
130
      }
130
      }
131
      sysapi.getResourceTool(params).then((resp) => {
131
      sysapi.getResourceTool(params).then((resp) => {
132
        this.cameraList = resp.data.data.data || []
132
        const res = resp.data.data.data || []
133
        let data = []
134
        res.forEach(item => data.push(item.pictureUrl))
135
        this.getListFileUrl(res, data)
133
        this.total = resp.data.data.total
136
        this.total = resp.data.data.total
134
      })
137
      })
135
    },
138
    },
139
    async getListFileUrl(res, data) {
140
      const resp = await sysapi.getListFileUrl(data)
141
      res.filter((item, index) => {
142
        item.imageUrl = resp.data.data[index]
143
      })
144
      this.cameraList = res
145
    },
136
    groupClick(item) {
146
    groupClick(item) {
137
      // 选中更换摄像头
147
      // 选中更换摄像头
138
      this.form.resourceToolName = item.resourceToolName
148
      this.form.resourceToolName = item.resourceToolName

+ 157 - 51
security-protection-platform/src/modules/usermana/components/modal/addUser.vue

1
<template>
1
<template>
2
  <t-modal :visibled.sync="isVisibled" :mask-closable="false">
2
  <t-modal :visibled.sync="isVisibled" :mask-closable="false" width="600px">
3
    <template slot="header">
3
    <template slot="header">
4
      <div class="device-modal-title">{{ isEdit?'用户编辑':'新增用户' }}</div>
4
      <div class="device-modal-title">{{ isEdit?'用户编辑':'新增用户' }}</div>
5
    </template>
5
    </template>
6
    <t-form ref="addUserModal" :model="addUserModal" :rules="addUserModalRules" label-position="right">
6
    <t-form ref="addUserModal" :model="addUserModal" :rules="addUserModalRules" label-position="right">
7
      <t-form-item label="姓名:" prop="name">
7
      <t-form-item label="姓名:" prop="name">
8
        <t-input v-model="addUserModal.name" placeholder="请输入姓名"></t-input>
8
        <t-input v-model="addUserModal.name" style="width:300px" placeholder="请输入姓名"></t-input>
9
      </t-form-item>
9
      </t-form-item>
10
      <t-form-item label="员工编号:" prop="code">
10
      <t-form-item label="员工编号:" prop="code">
11
        <t-input v-model="addUserModal.code" placeholder="请输入员工编号"></t-input>
11
        <t-input v-model="addUserModal.code" placeholder="请输入员工编号" style="width:300px"></t-input>
12
      </t-form-item>
12
      </t-form-item>
13
      <t-form-item label="公司:" prop="apartments">
13
      <t-form-item label="公司:" prop="apartments">
14
        <t-select v-model="addUserModal.apartments" placeholder="请选择公司" clearable>
14
        <t-select v-model="addUserModal.apartments" width="300px" placeholder="请选择公司" clearable>
15
          <t-option v-for="(item,index) in companyList" :value="item.id" :key="index">{{ item.name }}</t-option>
15
          <t-option v-for="(item,index) in companyList" :value="item.id" :key="index">{{ item.name }}</t-option>
16
        </t-select>
16
        </t-select>
17
      </t-form-item>
17
      </t-form-item>
18
      <t-form-item v-if="addUserModal.apartments!==''" label="部门:" prop="organizeCode">
18
      <t-form-item v-if="addUserModal.apartments!==''" label="部门:" prop="organizeCode">
19
        <t-select-tree v-model="addUserModal.organizeCode" :node-data="departmentTypesList" node-key="id"></t-select-tree>
19
        <t-select-tree v-model="addUserModal.organizeCode" :node-data="departmentTypesList" width="300px" node-value="data" node-key="data"></t-select-tree>
20
      </t-form-item>
20
      </t-form-item>
21
      <t-form-item label="职务:" prop="mainJobPosition">
21
      <t-form-item label="职务:" prop="mainJobPosition">
22
        <t-select v-model="addUserModal.mainJobPosition" placeholder="请选择职务" clearable>
22
        <t-select v-model="addUserModal.mainJobPosition" width="300px" placeholder="请选择职务" clearable>
23
          <t-option v-for="(item,index) in jobPoisitonList" :value="item.code" :key="index">{{ item.value }}</t-option>
23
          <t-option v-for="(item,index) in jobPoisitonList" :value="item.code" :key="index">{{ item.value }}</t-option>
24
        </t-select>
24
        </t-select>
25
      </t-form-item>
25
      </t-form-item>
26
      <t-form-item label="年龄:" prop="birthday">
26
      <t-form-item label="年龄:" prop="birthday">
27
        <t-date-picker v-model="addUserModal.birthday" placeholder="请输入年龄" @date-change="startPickerDateChange"></t-date-picker>
27
        <t-date-picker v-model="addUserModal.birthday" style="width:300px" placeholder="请输入年龄" @date-change="startPickerDateChange"></t-date-picker>
28
      </t-form-item>
28
      </t-form-item>
29
      <t-form-item label="手机:" prop="mainWirelessCall">
29
      <t-form-item label="手机:" prop="mainWirelessCall">
30
        <t-input v-model="addUserModal.mainWirelessCall" placeholder="请输入11位手机号"></t-input>
30
        <t-input v-model="addUserModal.mainWirelessCall" style="width:300px" placeholder="请输入11位手机号"></t-input>
31
      </t-form-item>
31
      </t-form-item>
32
      <t-form-item label="人脸图片:" prop="facePicture">
33
        <t-upload
34
          ref="uploader"
35
          :show-uploaded="true"
36
          :allowed-ext="['jpg','jpeg','png']"
37
          :max-size="2048"
38
          :before-upload="$_onUploadBeforeUpload"
39
          :data="{picture:'11d'}"
40
          multiple
41
          style="width:120px;height:160px;background-color:#FFFFFF;"
42
          type="drag"
43
          action="http://10.19.90.34:8018/sp/employeeManagement/uploadEmployeePicture"
44
          class="demo-upload-list"
45
        >
46
          <div class="picture-upload">
47
            <t-icon class="upload-icon" icon="plus-outline"></t-icon>
48
            <span style="color:rgba(0, 0, 0, 0.45)">上传照片</span>
49
          </div>
50
        </t-upload>
32
      <t-form-item label="人脸图片:" style="display:flex" prop="facePicture">
33
        <div style="display:flex">
34
          <t-upload
35
            ref="uploader"
36
            :show-uploaded="false"
37
            :allowed-ext="['jpg','jpeg','png']"
38
            :max-size="2048"
39
            :before-upload="$_onUploadBeforeUpload"
40
            multiple
41
            style="width:120px;height:160px;background-color:#FFFFFF;"
42
            type="drag"
43
            action="http://10.19.90.34:8018/sp/employeeManagement/uploadEmployeePicture"
44
            class="demo-upload-list"
45
            @success = "$_onUploadSuccess"
46
          >
47
            <div class="picture-upload">
48
              <t-icon class="upload-icon" icon="plus-outline"></t-icon>
49
              <span style="color:rgba(0, 0, 0, 0.45)">上传照片</span>
50
            </div>
51
          </t-upload>
52
          <img v-show="showPicture" :src="showPicture" class="upload-img"/>
53
          <!-- <div v-show="showPicture" class="upload-edit">
54
            修改 </div> -->
55
          <t-upload
56
            v-show="showPicture"
57
            ref="uploader"
58
            :show-uploaded="false"
59
            :allowed-ext="['jpg','jpeg','png']"
60
            :max-size="2048"
61
            :before-upload="$_onUploadBeforeUpload"
62
            multiple
63
            type="drag"
64
            action="http://10.19.90.34:8018/sp/employeeManagement/uploadEmployeePicture"
65
            class="upload-edit"
66
            @success = "$_onUploadSuccess"
67
          >
68
            <div>上传</div>
69
          </t-upload>
70
          <img v-show="showPicture" :src="showPicture" class="upload-edit-img"/>
71
        </div>
51
        <span style="color:rgba(0, 0, 0, 0.45);font-size:12px">照片格式:jpg、png或bmp文件,且不超过2M</span>
72
        <span style="color:rgba(0, 0, 0, 0.45);font-size:12px">照片格式:jpg、png或bmp文件,且不超过2M</span>
52
      </t-form-item>
73
      </t-form-item>
53
    </t-form>
74
    </t-form>
54
    <template slot="footer">
75
    <template slot="footer">
55
      <t-button @click="resetModalData">取消</t-button>
76
      <t-button @click="resetModalData">取消</t-button>
56
      <t-button v-if="isEdit" :loading="loadingSubmit" color="primary" @click="submitModalData">修改</t-button>
77
      <t-button v-if="isEdit" :loading="loadingSubmit" color="primary" @click="editModalData">修改</t-button>
57
      <t-button v-else color="primary" @click="submitModalData">提交</t-button>
78
      <t-button v-else color="primary" @click="submitModalData">提交</t-button>
58
    </template>
79
    </template>
59
  </t-modal>
80
  </t-modal>
61
82
62
<script>
83
<script>
63
import sysapi from '@/api/usermana'
84
import sysapi from '@/api/usermana'
85
import formatDateTime from '@/utils/formatDateTime.js'
64
export default {
86
export default {
65
  props: {
87
  props: {
66
    visible: {
88
    visible: {
71
    companyList: {
93
    companyList: {
72
      type: Array,
94
      type: Array,
73
      default: () => []
95
      default: () => []
96
    },
97
    // 回显数据列表
98
    editUserModal: {
99
      type: Object,
100
      default: () => []
74
    }
101
    }
75
  },
102
  },
76
  data() {
103
  data() {
77
    // 手机号验证
104
    // 手机号验证
78
    // const VALIDATEPASSCHECK = (rule, value, callback) => {
79
    //   if (value === '') {
80
    //     callback(new Error('请输入11位手机号'))
81
    //   } else if (value.length > 0 & value.length !== 11) {
82
    //     callback(new Error('手机号格式不正确'))
83
    //   } else {
84
    //     callback()
85
    //   }
86
    // }
105
    const VALIDATEPASSCHECK = (rule, value, callback) => {
106
      if (value === '') {
107
        callback(new Error('请输入11位手机号'))
108
      } else if (value.length > 0 & value.length !== 11) {
109
        callback(new Error('手机号需为11位'))
110
      } else {
111
        callback()
112
      }
113
    }
87
    return {
114
    return {
115
      // 按钮是否加载中
116
      loadingSubmit: false,
88
      // 是否为编辑状态
117
      // 是否为编辑状态
89
      isEdit: false,
118
      isEdit: false,
90
      // 部门列表
119
      // 部门列表
92
      // 职务列表
121
      // 职务列表
93
      uploadList: [],
122
      uploadList: [],
94
      jobPoisitonList: [],
123
      jobPoisitonList: [],
124
      // 回显图片
125
      showPicture: '',
95
      // 新增用户表单
126
      // 新增用户表单
96
      addUserModal: {
127
      addUserModal: {
97
        name: '',
128
        name: '',
121
          { required: true, message: '职务不能为空', trigger: 'change' }
152
          { required: true, message: '职务不能为空', trigger: 'change' }
122
        ],
153
        ],
123
        birthday: [
154
        birthday: [
124
          { required: true, message: '年龄不能为空', trigger: 'blur' }
155
          { required: true, message: '年龄不能为空' }
125
        ],
156
        ],
126
        mainWirelessCall: [
157
        mainWirelessCall: [
127
          { required: true, message: '请输入11位手机号', trigger: 'blur' }
158
          { validator: VALIDATEPASSCHECK, required: true, trigger: 'blur' }
128
        ],
159
        ],
129
        facePicture: [
160
        facePicture: [
130
          { required: true, message: '图片不能为空', trigger: 'blur' }
161
          { required: true, message: '图片不能为空', trigger: 'blur' }
149
      this.addUserModal.organizeCode = ''
180
      this.addUserModal.organizeCode = ''
150
      // 查询部门列表
181
      // 查询部门列表
151
      this.queryCycleChildOrg(val)
182
      this.queryCycleChildOrg(val)
183
    },
184
    editUserModal () {
185
      this.getCompanyList()
152
    }
186
    }
153
  },
187
  },
154
  mounted() {
188
  mounted() {
166
            organizeCode: this.addUserModal.organizeCode, // 部门CODE
200
            organizeCode: this.addUserModal.organizeCode, // 部门CODE
167
            mainWirelessCall: this.addUserModal.mainWirelessCall, // 手机号码
201
            mainWirelessCall: this.addUserModal.mainWirelessCall, // 手机号码
168
            mainJobPosition: this.addUserModal.mainJobPosition, // 职务
202
            mainJobPosition: this.addUserModal.mainJobPosition, // 职务
169
            field1: this.addUserModal.facePicture, // 照片标识
203
            field1: this.addUserModal.field1, // 照片标识
170
            field4: this.addUserModal.apartments, // 公司ID
204
            field4: this.addUserModal.apartments, // 公司ID
171
            birthday: Math.round(new Date() / 1000) // 生日(时间戳)
205
            birthday: this.addUserModal.birthday // 生日(时间戳)
172
          }
206
          }
173
          sysapi.creteEmployee({params: obj}).then(res => {
174
            console.log(res)
207
          sysapi.creteEmployee(obj).then(res => {
175
            if (res.data.success === true) {
208
            if (res.data.success === true) {
176
              this.$Message.success('新增成功')
209
              this.$Message.success('提交成功')
210
              this.$refs['addUserModal'].resetFields()
177
            } else {
211
            } else {
178
              console.log(res.data.fail.message)
212
              console.log(res.data.fail.message)
179
              this.$Message.success(res.data.fail.message)
213
              this.$Message.success(res.data.fail.message)
182
        }
216
        }
183
      })
217
      })
184
    },
218
    },
219
    // 修改用户个人信息
220
    editModalData() {
221
      this.loadingSubmit = true
222
      let obj = {
223
        id: this.editUserModal.employeeId, // 主键ID
224
        name: this.addUserModal.name, // 员工姓名
225
        code: this.addUserModal.code, // 员工编号
226
        organizeCode: this.addUserModal.organizeCode, // 部门CODE
227
        mainWirelessCall: this.addUserModal.mainWirelessCall, // 手机号码
228
        mainJobPosition: this.addUserModal.mainJobPosition, // 职务
229
        field1: this.addUserModal.field1, // 照片标识
230
        field4: this.addUserModal.apartments, // 公司ID
231
        birthday: +new Date(this.addUserModal.birthday) // 生日(时间戳)
232
      }
233
      sysapi.editUserDetail(obj).then(res => {
234
        if (res.status === 200) {
235
          this.$Message.success('修改成功!')
236
          this.isVisibled = false
237
          this.resetModalData()
238
          this.$emit('getUserList')
239
        } else {
240
          this.$Message.danger('修改失败!')
241
        }
242
        this.loadingSubmit = false
243
      })
244
    },
185
    // 重置表单数据
245
    // 重置表单数据
186
    resetModalData () {
246
    resetModalData () {
187
      this.$refs['addUserModal'].resetFields()
247
      this.$refs['addUserModal'].resetFields()
188
      this.imgUrl = ''
248
      this.imgUrl = ''
249
      this.isEdit = false
189
      this.isVisibled = false
250
      this.isVisibled = false
251
      this.showPicture = ''
252
    },
253
    // 获得编辑回显数据
254
    getCompanyList() {
255
      this.$nextTick(() => {
256
        this.addUserModal = {
257
          'name': this.editUserModal.employeeName, // 员工姓名
258
          'code': this.editUserModal.employeeCode, // 员工编号
259
          'organizeCode': this.editUserModal.organizationCode, // 部门CODE
260
          'mainWirelessCall': this.editUserModal.mainWirelessCall, // 手机号码
261
          'mainJobPosition': this.editUserModal.employeePosition, // 职务
262
          'apartments': '', // 公司ID
263
          'birthday': formatDateTime(new Date(this.editUserModal.birthday - 0)) // 生日(时间戳)
264
        }
265
        this.addUserModal.apartments = parseInt(this.editUserModal.field4)
266
        this.showPicture = this.editUserModal.pictureUrl// 照片标识
267
        this.isEdit = true
268
      })
190
    },
269
    },
191
    // 查询职务列表
270
    // 查询职务列表
192
    async getJobPositionList() {
271
    async getJobPositionList() {
212
          if (item.pid === '-1') {
291
          if (item.pid === '-1') {
213
            delete item.pid
292
            delete item.pid
214
          }
293
          }
215
          item.id = item.orgId
294
          // item.id = item.orgId
216
          data1.some((item1) => {
295
          data1.some((item1) => {
217
            if (item.pid === item1.id) {
296
            if (item.pid === item1.id) {
218
              item.pid = item1.orgId
297
              item.pid = item1.orgId
223
        })
302
        })
224
        // eslint-disable-next-line no-return-assign
303
        // eslint-disable-next-line no-return-assign
225
        this.departmentTypesList = data.filter(item => item.data = item.id)
304
        this.departmentTypesList = data.filter(item => item.data = item.id)
305
        this.$nextTick(() => {
306
          this.addUserModal.organizeCode = this.editUserModal.organizationCode
307
        })
226
      } else {
308
      } else {
227
        this.$Message.danger('部门类型列表数据获取失败!')
309
        this.$Message.danger('部门类型列表数据获取失败!')
228
      }
310
      }
237
            orgId: item.id + '',
319
            orgId: item.id + '',
238
            id: item.code,
320
            id: item.code,
239
            label: item.name,
321
            label: item.name,
240
            pid: item.parentCode
322
            pid: item.parentCode,
323
            data: item.code
241
          })
324
          })
242
          this.nextDepartment(item.departments, arr)
325
          this.nextDepartment(item.departments, arr)
243
        })
326
        })
257
      console.log(file)
340
      console.log(file)
258
    },
341
    },
259
    $_onUploadSuccess (res, file) {
342
    $_onUploadSuccess (res, file) {
260
      this.imgUrl = res.data.data.toolPictureUrl
261
      this.addDeviceModalForm.pictureUrl = res.data.data.pictureUrl
262
      // 因为演示用的上传服务器返回数据格式的原因,这里模拟添加 url
343
      // 因为演示用的上传服务器返回数据格式的原因,这里模拟添加 url
263
      console.log(file)
264
      this.uploadList.push(file)
344
      this.showPicture = res.data.headerPictureUrl
345
      this.addUserModal.field1 = res.data.pictureUrl
265
    },
346
    },
266
    $_onUploadRemoveFile () { },
347
    $_onUploadRemoveFile () { },
267
    $_onUploadExceededSize () { },
348
    $_onUploadExceededSize () { },
305
<style lang="scss" scoped>
386
<style lang="scss" scoped>
306
.demo-upload-list{
387
.demo-upload-list{
307
  .upload--drag{
388
  .upload--drag{
308
  background-color:#FFFFFF
389
  background-color:#FFFFFF;
390
  align-items: center;
391
  justify-content: center;
392
  display: flex
393
}
394
}
395
.upload-img{
396
  width:120px;
397
  height:160px;
398
  margin-left:12px
399
}
400
.upload-edit{
401
  width:120px;
402
  height:160px;
403
  margin-left:12px;
404
  background-color:rgba(0, 0, 0, 0.5);
405
  justify-content: center;
406
  align-items: center;
407
  color: white;
408
  display: flex;
409
  cursor: pointer;
410
  z-index: 2;
309
}
411
}
412
.upload-edit-img{
413
  margin-left:-120px;
414
  width:120px;
415
  height:160px;
310
}
416
}
311
.picture-upload{
417
.picture-upload{
312
  display:flex;
418
  display:flex;

+ 19 - 5
security-protection-platform/src/modules/usermana/index.vue

52
          </t-table-column>
52
          </t-table-column>
53
          <t-table-column label="操作">
53
          <t-table-column label="操作">
54
            <template v-slot="{row}">
54
            <template v-slot="{row}">
55
              <a href="javascript:;" style="color:#0089D4;" @click="editDeviceData(row.resourceToolId)">编辑</a>
55
              <a href="javascript:;" style="color:#0089D4;" @click="editDeviceData(row.id)">编辑</a>
56
              <a href="javascript:;" style="color:#0089D4;" @click="deleteUserData(row)">删除</a>
56
              <a href="javascript:;" style="color:#0089D4;" @click="deleteUserData(row)">删除</a>
57
              <a v-if="row.field2!='5'" href="javascript:;" style="color:#0089D4;" @click="auditdata(row.id,row.companyName)">人脸审核</a>
57
              <a v-if="row.field2!='5'" href="javascript:;" style="color:#0089D4;" @click="auditdata(row.id,row.companyName)">人脸审核</a>
58
            </template>
58
            </template>
64
        </t-pager>
64
        </t-pager>
65
      </div>
65
      </div>
66
    </t-card>
66
    </t-card>
67
    <add-user-modal :company-list="companyTypesList" :visible.sync="addDeviceModal"></add-user-modal>
67
    <add-user-modal :edit-user-modal="currentEditDevice" :company-list="companyTypesList" :visible.sync="addDeviceModal" @getUserList="getUserList"></add-user-modal>
68
    <auditModal :auditshow.sync="auditshow" :auditid="auditid" :company-name="companyName" @refeshUserList="getUserList"></auditModal>
68
    <auditModal :auditshow.sync="auditshow" :auditid="auditid" :company-name="companyName" @refeshUserList="getUserList"></auditModal>
69
  </div>
69
  </div>
70
</template>
70
</template>
112
      // 人脸审核选择id
112
      // 人脸审核选择id
113
      auditid: 0,
113
      auditid: 0,
114
      // 人脸审核的公司名称
114
      // 人脸审核的公司名称
115
      companyName: ''
115
      companyName: '',
116
      // 判断页面是否是第一次渲染
117
      firstCreated: true
116
118
117
    }
119
    }
118
  },
120
  },
137
  created () {
139
  created () {
138
    // this.getDeviceData()
140
    // this.getDeviceData()
139
    this.getCompanyTypesList()
141
    this.getCompanyTypesList()
142
    // 默认选中能源部
143
    this.companyTypeId = 10086
140
  },
144
  },
141
  methods: {
145
  methods: {
142
    // 获取用户列表数据
146
    // 获取用户列表数据
211
        })
215
        })
212
        // eslint-disable-next-line no-return-assign
216
        // eslint-disable-next-line no-return-assign
213
        this.departmentTypesList = data.filter(item => item.data = item.id)
217
        this.departmentTypesList = data.filter(item => item.data = item.id)
218
        // 进入页面默认选中ebc
219
        if (this.departmentTypeId === '' && this.firstCreated) {
220
          this.$nextTick(() => {
221
            this.departmentTypeId = '10087'
222
            this.firstCreated = false
223
          })
224
        }
214
      } else {
225
      } else {
215
        this.$Message.danger('部门类型列表数据获取失败!')
226
        this.$Message.danger('部门类型列表数据获取失败!')
216
      }
227
      }
249
    },
260
    },
250
    // 删除数据
261
    // 删除数据
251
    deleteUserData (row) {
262
    deleteUserData (row) {
263
      console.log(row)
252
      this.$Confirm.confirm({
264
      this.$Confirm.confirm({
253
        title: '正在准备删除...',
265
        title: '正在准备删除...',
254
        content: '<p>确定要删除?</p><p>删除后将无法还原!</p>',
266
        content: '<p>确定要删除?</p><p>删除后将无法还原!</p>',
307
    showAddDeviceModal () {
319
    showAddDeviceModal () {
308
      this.addDeviceModal = true
320
      this.addDeviceModal = true
309
    },
321
    },
322
    // 编辑新增用户信息
310
    async editDeviceData (id) {
323
    async editDeviceData (id) {
311
      const res = await sysapi.getDeviceInfo(id)
324
      const res = await sysapi.getOneEmployee({ params: { employeeId: id } })
312
      if (res.status === 200) {
325
      if (res.status === 200) {
313
        this.currentEditDevice = res.data
326
        this.currentEditDevice = res.data.data
327
        console.log(this.currentEditDevice)
314
      } else {
328
      } else {
315
        this.$Message.danger('设备数据获取失败!')
329
        this.$Message.danger('设备数据获取失败!')
316
      }
330
      }

+ 4 - 4
security-protection-platform/src/modules/videoSurveillance/components/ReplayDialog/index.vue

70
      videoList: [],
70
      videoList: [],
71
      // 视频播放器对象
71
      // 视频播放器对象
72
      $player: null,
72
      $player: null,
73
      // 开始时间
74
      beginDay: '2020-12-19 20:14:00',
75
      // 结束时间
76
      endDay: '2020-12-19 20:14:59',
73
      //   开始时间
74
      beginDay: formatDateTime(new Date(+new Date() - 10 * 60 * 1000), 'yyyy-MM-dd hh:mm:ss'),
75
      //   结束时间
76
      endDay: formatDateTime(new Date(), 'yyyy-MM-dd hh:mm:ss'),
77
      isShow: true,
77
      isShow: true,
78
      playerOptions: {
78
      playerOptions: {
79
        playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度
79
        playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度

+ 27 - 7
security-protection-platform/src/modules/videoSurveillance/distinguishRecord/index.vue

44
        </div>
44
        </div>
45
      </div>
45
      </div>
46
      <div class="img-viewer">
46
      <div class="img-viewer">
47
        <div v-for="(item,index) in dataImg" :key="index" :src="item.idenPictureUrl" class="image-carousel">
48
          <img :src="'http://10.19.90.34:19000/ai-image/'+item.idenPictureUrl" class="img-viewer-size" @click="getParticularsData(item.aiIdenLogId,index)">
49
          <span :class="{'fileName' : index === fileNameIndex}" style="width: 132px;margin-right: 14px;text-align:center">{{ item.fileName }}</span>
50
        </div>
47
        <t-carousel dots="none" arrow="always" style="width: 100%">
48
          <t-carousel-item v-for="(item1,index1) in dataImgList" :key="index1" style="width: 100%;padding-left: 10%">
49
            <div v-for="(item, index) in item1" :key="index" :src="item.idenPictureUrl" class="image-carousel">
50
              <img :src="'http://10.19.90.34:19000/ai-image/'+item.idenPictureUrl" class="img-viewer-size" @click="getParticularsData(item.aiIdenLogId,index)">
51
              <span :class="{'fileName' : index === fileNameIndex}" style="width: 132px;margin-right: 14px;text-align:center">{{ item.fileName }}</span>
52
            </div>
53
          </t-carousel-item>
54
        </t-carousel>
51
      </div>
55
      </div>
52
    </div>
56
    </div>
53
  </div>
57
  </div>
65
      devicePosition: '',
69
      devicePosition: '',
66
      distinguishUrl: '',
70
      distinguishUrl: '',
67
      dataImg: [],
71
      dataImg: [],
72
      dataImgList: [],
68
      fileNameIndex: 0,
73
      fileNameIndex: 0,
69
      playerOptions: {
74
      playerOptions: {
70
        playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度
75
        playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度
116
      }
121
      }
117
      var flag = this.startreend(this.startDate, this.endDate)
122
      var flag = this.startreend(this.startDate, this.endDate)
118
      if (flag) {
123
      if (flag) {
119
        var data = { params: { beginDay: this.startDate, endDay: this.endDate, id: this.videoId }}
124
        var data = { params: { beginDay: this.startDate, endDay: this.endDate, id: this.videoId, pageNumber: 1, pageSize: 10000 }}
120
        sysapi.getDistinguishData(data).then(res => {
125
        sysapi.getDistinguishData(data).then(res => {
121
          console.log(res.data)
126
          console.log(res.data)
122
          this.dataImg = res.data.data
127
          this.dataImg = res.data.data
123
          if (res.data.data.length > 0) {
128
          if (res.data.data.length > 0) {
124
            this.getParticularsData(res.data.data[0].aiIdenLogId, 0)
129
            this.getParticularsData(res.data.data[0].aiIdenLogId, 0)
130
            this.dataImgList = this.arrayGroup(res.data.data, 10)
125
          } else {
131
          } else {
126
            this.devicePosition = ''
132
            this.devicePosition = ''
127
            this.defineResult = ''
133
            this.defineResult = ''
135
        this.$Message.danger('开始时间不能在结束时间的后面')
141
        this.$Message.danger('开始时间不能在结束时间的后面')
136
      }
142
      }
137
    },
143
    },
144
    arrayGroup(array, subGroupLength) {
145
      let index = 0
146
      let newArray = []
147
      while(index < array.length) {
148
        newArray.push(array.slice(index, index += subGroupLength))
149
      }
150
      return newArray
151
    },
138
    // 字符串更改为时间类型
152
    // 字符串更改为时间类型
139
    stringtodate (date) {
153
    stringtodate (date) {
140
      date = date.substring(0, 19)
154
      date = date.substring(0, 19)
240
            display: flex;
254
            display: flex;
241
            .image-carousel{
255
            .image-carousel{
242
              display: flex;
256
              display: flex;
257
              width: 9%;
258
              height: 80%;
243
              flex-direction: column;
259
              flex-direction: column;
244
              .img-viewer-size{
260
              .img-viewer-size{
245
                cursor:pointer;
261
                cursor:pointer;
246
                width: 132px;
247
                height: 88px;
262
                width: 100%;
263
                height: 100%;
248
                margin-right: 14px;
264
                margin-right: 14px;
265
                padding-left: 2%;
249
              }
266
              }
250
            }
267
            }
251
        }
268
        }
252
    }
269
    }
270
    .carousel-control-prev-icon{
271
      color: #009bf3;
272
    }
253
}
273
}
254
.fileName{
274
.fileName{
255
  color: #009bf3;
275
  color: #009bf3;

+ 37 - 22
security-protection-platform/src/modules/videoSurveillance/index.vue

1
<template>
1
<template>
2
  <div class="page-main">
2
  <div class="page-main">
3
    <t-button-group class="top-btn">
3
    <t-button-group class="top-btn">
4
      <t-button v-for="(item,index) in sceneList" :key="index" :value="item.monitorSceneId" :color="item.monitorSceneId === selectedMonitorScene ? 'primary' : 'secondary'" @click="tabClick(item.monitorSceneId)">
4
      <t-button v-for="(item,index) in sceneList" :key="index" :value="item.monitorSceneId" :color="item.monitorSceneId === selectedMonitorScene ? 'primary' : 'secondary'" @click="tabClick(item.monitorSceneId, item.monitorViewLayout)">
5
        {{ item.monitorSceneName }}
5
        {{ item.monitorSceneName }}
6
      </t-button>
6
      </t-button>
7
    </t-button-group>
7
    </t-button-group>
125
          btn1.className = 'aidicon aidicon-piechart-outline'
125
          btn1.className = 'aidicon aidicon-piechart-outline'
126
          btn1.setAttribute('title', '视频回放')
126
          btn1.setAttribute('title', '视频回放')
127
          btn1.addEventListener('click', () => {
127
          btn1.addEventListener('click', () => {
128
            this.handleReview(this.videoList[index].id)
128
            this.handleReview(this.videoList[index].resourceToolId)
129
          })
129
          })
130
          item.appendChild(txt)
130
          item.appendChild(txt)
131
          item.appendChild(btn)
131
          item.appendChild(btn)
141
        if (element.id === this.gateFieldData) {
141
        if (element.id === this.gateFieldData) {
142
          sysapi.getMonitorScene(this.organizationList[index].id).then((resp) => {
142
          sysapi.getMonitorScene(this.organizationList[index].id).then((resp) => {
143
            this.sceneList = resp.data.data || []
143
            this.sceneList = resp.data.data || []
144
            if (resp.data.data[0].monitorViewLayout === '1X1') {
145
              this.viewLayoutSpan = 10
146
              this.videoPageSize = 1
147
            } else if (resp.data.data[0].monitorViewLayout === '2X2') {
148
              this.viewLayoutSpan = 6
149
              this.videoPageSize = 4
150
            } else if (resp.data.data[0].monitorViewLayout === '3X3') {
151
              this.viewLayoutSpan = 4
152
              this.videoPageSize = 9
153
            } else if (resp.data.data[0].monitorViewLayout === '4X4') {
154
              this.viewLayoutSpan = 3
155
              this.videoPageSize = 16
156
            }
157
            this.tabClick(this.sceneList[0].monitorSceneId)
144
            // if (resp.data.data[0].monitorViewLayout === '1X1') {
145
            //   this.viewLayoutSpan = 10
146
            //   this.videoPageSize = 1
147
            // } else if (resp.data.data[0].monitorViewLayout === '2X2') {
148
            //   this.viewLayoutSpan = 6
149
            //   this.videoPageSize = 4
150
            // } else if (resp.data.data[0].monitorViewLayout === '3X3') {
151
            //   this.viewLayoutSpan = 4
152
            //   this.videoPageSize = 9
153
            // } else if (resp.data.data[0].monitorViewLayout === '4X4') {
154
            //   this.viewLayoutSpan = 3
155
            //   this.videoPageSize = 16
156
            // }
157
            this.tabClick(this.sceneList[0].monitorSceneId, resp.data.data[0].monitorViewLayout)
158
          })
158
          })
159
        }
159
        }
160
      })
160
      })
169
      }
169
      }
170
      if (res.status === 200) {
170
      if (res.status === 200) {
171
        this.replayList = res.data.data
171
        this.replayList = res.data.data
172
        console.log(this.replayList)
173
      } else {
172
      } else {
174
        this.$Message.danger('视频列表数据获取失败!')
173
        this.$Message.danger('视频列表数据获取失败!')
175
      }
174
      }
181
      this.showReplayDialog = true
180
      this.showReplayDialog = true
182
    },
181
    },
183
    // 切换场景
182
    // 切换场景
184
    async tabClick (id) {
183
    async tabClick (id, monitorViewLayout) {
184
      if (monitorViewLayout === '1X1') {
185
        this.viewLayoutSpan = 10
186
        this.videoPageSize = 1
187
      } else if (monitorViewLayout === '2X2') {
188
        this.viewLayoutSpan = 6
189
        this.videoPageSize = 4
190
      } else if (monitorViewLayout === '3X3') {
191
        this.viewLayoutSpan = 4
192
        this.videoPageSize = 9
193
      } else if (monitorViewLayout === '4X4') {
194
        this.viewLayoutSpan = 3
195
        this.videoPageSize = 16
196
      }
185
      this.selectedMonitorScene = id
197
      this.selectedMonitorScene = id
186
      this.paramsObj.page = 0
198
      this.paramsObj.page = 0
187
      this.videoList = []
199
      this.videoList = []
207
    },
219
    },
208
    // 获得风场大门数据
220
    // 获得风场大门数据
209
    getVideoSurveillanceData () {
221
    getVideoSurveillanceData () {
222
      this.videoList = []
223
      this.videoOptions = []
210
      var id = this.tabId
224
      var id = this.tabId
211
      this.paramsObj.page = this.videoCurrent
225
      this.paramsObj.page = this.videoCurrent
212
      sysapi.getVideoSurveillanceData({ params: { monitorSceneId: id } }).then(res => {
213
        this.videoList = res.data.data
214
        for (let i in res.data.data) {
226
      sysapi.getVideoSurveillanceDataForPage({ params: { monitorSceneId: id, pageNumber: this.videoCurrent, pageSize: this.videoPageSize } }).then(res => {
227
        this.videoList = res.data.data.data
228
        this.videoTotal = res.data.data.total
229
        for (let i in res.data.data.data) {
215
          let obj = {
230
          let obj = {
216
            autoplay: true, // 如果true,浏览器准备好时开始回放。
231
            autoplay: true, // 如果true,浏览器准备好时开始回放。
217
            muted: true, // 默认情况下将会消除任何音频。
232
            muted: true, // 默认情况下将会消除任何音频。
229
            sources: [{
244
            sources: [{
230
              withCredentials: false,
245
              withCredentials: false,
231
              type: 'application/x-mpegURL', // 这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目
246
              type: 'application/x-mpegURL', // 这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目
232
              src: res.data.data[i].videoUrl // url地址
247
              src: res.data.data.data[i].videoUrl // url地址
233
            }],
248
            }],
234
            flash: { hls: { withCredentials: false } },
249
            flash: { hls: { withCredentials: false } },
235
            html5: { hls: { withCredentials: false } },
250
            html5: { hls: { withCredentials: false } },

+ 2 - 1
security-protection-platform/src/routes.js

14
  {
14
  {
15
    path: '/',
15
    path: '/',
16
    component: Layout,
16
    component: Layout,
17
    redirect: '/attendance/report',
17
    redirect: '/dashboard',
18
    hidden: true
18
    hidden: true
19
  },
19
  },
20
  {
20
  {
21
    name: 'dashboard',
21
    name: 'dashboard',
22
    path: '/dashboard',
22
    path: '/dashboard',
23
    redirect: '/',
23
    component: () => import(/* webpackChunkName: "dashboard" */ './modules/dashboard'),
24
    component: () => import(/* webpackChunkName: "dashboard" */ './modules/dashboard'),
24
    meta: { title: '首页', icon: 'home' },
25
    meta: { title: '首页', icon: 'home' },
25
    children: [
26
    children: [

+ 2 - 1
security-protection-service/src/main/java/com/ai/bss/security/protection/controller/AiIdenLogManageController.java

46
		params.put("endTime", attendanceReport.getEndDay());
46
		params.put("endTime", attendanceReport.getEndDay());
47
		params.put("relateEmployeeNameAsLike", attendanceReport.getNameAsLike());
47
		params.put("relateEmployeeNameAsLike", attendanceReport.getNameAsLike());
48
		params.put("aiIdenModel", EbcConstant.AI_MODEL_FACE);
48
		params.put("aiIdenModel", EbcConstant.AI_MODEL_FACE);
49
		params.put("idenResultType", EbcConstant.AI_IDENTIFY_RESULT_ATTENDANCE);
49
50
50
		return aiIdenLogManageService.queryPageAiIdenLog(params, pageNumber, pageSize);
51
		return aiIdenLogManageService.queryPageAiIdenLog(params, pageNumber, pageSize);
51
	}
52
	}
73
		params.put("beginTime", attendanceReport.getBeginDay());
74
		params.put("beginTime", attendanceReport.getBeginDay());
74
		params.put("endTime", attendanceReport.getEndDay());
75
		params.put("endTime", attendanceReport.getEndDay());
75
		params.put("resourceToolId", attendanceReport.getId());
76
		params.put("resourceToolId", attendanceReport.getId());
76
		params.put("aiIdenModel", EbcConstant.AI_MODEL_CLOTHING_CODE);
77
		params.put("idenResultType", EbcConstant.AI_IDENTIFY_RESULT_ALARM);
77
78
78
		return aiIdenLogManageService.queryAllAiIdenLogPicture(params, pageNumber, pageSize);
79
		return aiIdenLogManageService.queryAllAiIdenLogPicture(params, pageNumber, pageSize);
79
	}
80
	}

+ 1 - 1
security-protection-service/src/main/java/com/ai/bss/security/protection/controller/InAndOutRecordController.java

75
	}
75
	}
76
	
76
	
77
	/**
77
	/**
78
	 * 首页查询进出记录
78
	 * 查询首页进出记录
79
	 * @return
79
	 * @return
80
	 * @throws Exception
80
	 * @throws Exception
81
	 */
81
	 */

+ 2 - 3
security-protection-service/src/main/java/com/ai/bss/security/protection/controller/MonitorVideoLogManageController.java

49
		return monitorVideoLogManageService.queryMonitorVideoLogByTime(monitorVideoLogCondition);
49
		return monitorVideoLogManageService.queryMonitorVideoLogByTime(monitorVideoLogCondition);
50
	}
50
	}
51
51
52
53
	/**
52
	/**
54
	 * 查询监控视频日志(按时间段)
53
	 * 查询监控视频日志(按时间段)
55
	 * @param attendanceReport
54
	 * @param attendanceReport
76
	 */
75
	 */
77
	@ResponseBody
76
	@ResponseBody
78
	@RequestMapping("/queryOneMonitorVideoLog")
77
	@RequestMapping("/queryOneMonitorVideoLog")
79
	public CommonResponse<EbcMonitorVideoLog> queryOneMonitorVideoLog(@RequestParam String monitorVideoLogId)
78
	public CommonResponse<String> queryOneMonitorVideoLog(@RequestParam String monitorVideoLogId)
80
			throws Exception {
79
			throws Exception {
81
		if (StringUtils.isEmpty(monitorVideoLogId)) {
80
		if (StringUtils.isEmpty(monitorVideoLogId)) {
82
			return CommonResponse.fail("500", "操作失败");
81
			return CommonResponse.fail("500", "操作失败");
94
	 */
93
	 */
95
	@ResponseBody
94
	@ResponseBody
96
	@RequestMapping("/getMonitorVideoLogByPictureTime")
95
	@RequestMapping("/getMonitorVideoLogByPictureTime")
97
	public CommonResponse<List<EbcMonitorVideoLog>> getMonitorVideoLogByPictureTime(@RequestParam String imageTime,@RequestParam String resourceToolId)
96
	public CommonResponse<String> getMonitorVideoLogByPictureTime(@RequestParam String imageTime,@RequestParam String resourceToolId)
98
			throws Exception {
97
			throws Exception {
99
		if (StringUtils.isEmpty(imageTime)||StringUtils.isEmpty(resourceToolId)) {
98
		if (StringUtils.isEmpty(imageTime)||StringUtils.isEmpty(resourceToolId)) {
100
			return CommonResponse.fail("500", "获取视频失败");
99
			return CommonResponse.fail("500", "获取视频失败");

+ 5 - 3
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/AiAlarmManageServiceImpl.java

164
		Map<String, String> pictureMap= uploadFileService.getFileUrlToMap(workTaskSafetyAlarmMap.get("idenPictureUrl"));
164
		Map<String, String> pictureMap= uploadFileService.getFileUrlToMap(workTaskSafetyAlarmMap.get("idenPictureUrl"));
165
		
165
		
166
		//视频信息
166
		//视频信息
167
		List<EbcMonitorVideoLog> logsList=monitorVideoLogManageService.getMonitorVideoLogByPictureTime(pictureMap.get("fileDateTimeStr"), workTaskSafetyAlarmMap.get("resourceToolId")).getData();
167
		/*List<EbcMonitorVideoLog> logsList=monitorVideoLogManageService.getMonitorVideoLogByPictureTime(pictureMap.get("fileDateTimeStr"), workTaskSafetyAlarmMap.get("resourceToolId")).getData();
168
		EbcMonitorVideoLog ebcMonitorVideoLog=null;
168
		EbcMonitorVideoLog ebcMonitorVideoLog=null;
169
		if (!CollectionUtils.isEmpty(logsList)) {
169
		if (!CollectionUtils.isEmpty(logsList)) {
170
			ebcMonitorVideoLog=logsList.get(0);
170
			ebcMonitorVideoLog=logsList.get(0);
171
			ebcMonitorVideoLog.setVideoFileUrl(uploadFileService.getFileUrl(ebcMonitorVideoLog.getVideoUrl()));
171
			ebcMonitorVideoLog.setVideoFileUrl(uploadFileService.getFileUrl(ebcMonitorVideoLog.getVideoUrl()));
172
		}
172
		}*/
173
		String videoFileUrl =monitorVideoLogManageService.getMonitorVideoLogByPictureTime(pictureMap.get("fileDateTimeStr"), workTaskSafetyAlarmMap.get("resourceToolId")).getData();
173
		
174
		
174
		Map<String,Object> resultMap= new HashMap<String, Object>();
175
		Map<String,Object> resultMap= new HashMap<String, Object>();
175
		resultMap.put("alarmInfo", workTaskSafetyAlarmMap);
176
		resultMap.put("alarmInfo", workTaskSafetyAlarmMap);
176
		resultMap.put("pictureInfo", pictureMap);
177
		resultMap.put("pictureInfo", pictureMap);
177
		resultMap.put("videoInfo", ebcMonitorVideoLog);
178
		//resultMap.put("videoInfo", ebcMonitorVideoLog);
179
		resultMap.put("videoInfo", videoFileUrl);
178
		return CommonResponse.ok(resultMap);
180
		return CommonResponse.ok(resultMap);
179
	}
181
	}
180
182

+ 7 - 3
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/AiIdenLogManageServiceImpl.java

252
		Map<String, String> pictureMap = uploadFileService.getFileUrlToMap(aiIdenLog.getIdenPictureUrl());
252
		Map<String, String> pictureMap = uploadFileService.getFileUrlToMap(aiIdenLog.getIdenPictureUrl());
253
253
254
		// 视频信息
254
		// 视频信息
255
		List<EbcMonitorVideoLog> logsList = monitorVideoLogManageService
255
		/*List<EbcMonitorVideoLog> logsList = monitorVideoLogManageService
256
				.getMonitorVideoLogByPictureTime(pictureMap.get("fileDateTimeStr"), aiIdenLog.getResourceToolId())
256
				.getMonitorVideoLogByPictureTime(pictureMap.get("fileDateTimeStr"), aiIdenLog.getResourceToolId())
257
				.getData();
257
				.getData();
258
		EbcMonitorVideoLog ebcMonitorVideoLog = null;
258
		EbcMonitorVideoLog ebcMonitorVideoLog = null;
259
		if (!CollectionUtils.isEmpty(logsList)) {
259
		if (!CollectionUtils.isEmpty(logsList)) {
260
			ebcMonitorVideoLog = logsList.get(0);
260
			ebcMonitorVideoLog = logsList.get(0);
261
			ebcMonitorVideoLog.setVideoFileUrl(uploadFileService.getFileUrl(ebcMonitorVideoLog.getVideoUrl()));
261
			ebcMonitorVideoLog.setVideoFileUrl(uploadFileService.getFileUrl(ebcMonitorVideoLog.getVideoUrl()));
262
		}
262
		}*/
263
		String videoFileUrl =monitorVideoLogManageService
264
				.getMonitorVideoLogByPictureTime(pictureMap.get("fileDateTimeStr"), aiIdenLog.getResourceToolId())
265
				.getData();
263
266
264
		Map<String, Object> resultMap = new HashMap<String, Object>();
267
		Map<String, Object> resultMap = new HashMap<String, Object>();
265
		resultMap.put("alarmInfo", aiIdenLogInfoMap);
268
		resultMap.put("alarmInfo", aiIdenLogInfoMap);
266
		resultMap.put("pictureInfo", pictureMap);
269
		resultMap.put("pictureInfo", pictureMap);
267
		resultMap.put("videoInfo", ebcMonitorVideoLog);
270
		//resultMap.put("videoInfo", ebcMonitorVideoLog);
271
		resultMap.put("videoInfo", videoFileUrl);
268
		return CommonResponse.ok(resultMap);
272
		return CommonResponse.ok(resultMap);
269
	}
273
	}
270
274

+ 5 - 0
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/EmployeeManagementServiceImpl.java

106
		resultMap.put("organizationCode", response.getData().getOrganizeCode());
106
		resultMap.put("organizationCode", response.getData().getOrganizeCode());
107
		resultMap.put("organizationName", response.getData().getOrgName());
107
		resultMap.put("organizationName", response.getData().getOrgName());
108
		resultMap.put("age", response.getData().getAge());
108
		resultMap.put("age", response.getData().getAge());
109
		
109
		resultMap.put("mainWirelessCall", response.getData().getMainWirelessCall());
110
		resultMap.put("mainWirelessCall", response.getData().getMainWirelessCall());
110
		resultMap.put("field1", response.getData().getField1()); // 头像标识
111
		resultMap.put("field1", response.getData().getField1()); // 头像标识
111
		resultMap.put("field2", response.getData().getField2()); // 审核结果
112
		resultMap.put("field2", response.getData().getField2()); // 审核结果
112
		resultMap.put("field3", response.getData().getField3()); // 审核意见
113
		resultMap.put("field3", response.getData().getField3()); // 审核意见
113
		resultMap.put("field4", response.getData().getField4()); // 公司
114
		resultMap.put("field4", response.getData().getField4()); // 公司
114
115
116
		if (response.getData().getBirthday()!=null) {
117
			resultMap.put("birthday", String.valueOf(response.getData().getBirthday().getTime()));
118
		}
119
		
115
		resultMap.put("pictureUrl",
120
		resultMap.put("pictureUrl",
116
				uploadFileService.getFileUrl(response.getData().getField1(), minioConfig.getBucketHeaderImage()));
121
				uploadFileService.getFileUrl(response.getData().getField1(), minioConfig.getBucketHeaderImage()));
117
122

+ 21 - 12
security-protection-service/src/main/java/com/ai/bss/security/protection/service/impl/MonitorVideoLogManageServiceImpl.java

46
	private SecurityProtectionMinioConfig minioConfig;
46
	private SecurityProtectionMinioConfig minioConfig;
47
47
48
	@Override
48
	@Override
49
	@Deprecated
49
	public CommonResponse<List<EbcMonitorVideoLog>> queryMonitorVideoLogByTime(MonitorVideoLog monitorVideoLogCondition)
50
	public CommonResponse<List<EbcMonitorVideoLog>> queryMonitorVideoLogByTime(MonitorVideoLog monitorVideoLogCondition)
50
			throws Exception {
51
			throws Exception {
51
		CommonRequest<MonitorVideoLog> request = new CommonRequest<MonitorVideoLog>(monitorVideoLogCondition);
52
		CommonRequest<MonitorVideoLog> request = new CommonRequest<MonitorVideoLog>(monitorVideoLogCondition);
103
	}
104
	}
104
105
105
	@Override
106
	@Override
106
	public CommonResponse<EbcMonitorVideoLog> queryMonitorVideoLogById(Long monitorVideoLogId) throws Exception {
107
	public CommonResponse<String> queryMonitorVideoLogById(Long monitorVideoLogId) throws Exception {
107
		CommonRequest<Long> request = new CommonRequest<Long>(monitorVideoLogId);
108
		CommonRequest<Long> request = new CommonRequest<Long>(monitorVideoLogId);
108
		CommonResponse<MonitorVideoLog> response = monitorSceneQuery.loadMonitorVideoLog(request);
109
		CommonResponse<MonitorVideoLog> response = monitorSceneQuery.loadMonitorVideoLog(request);
109
110
110
		if (response == null || response.getData() == null) {
111
		if (response == null || response.getData() == null) {
111
			return CommonResponse.fail("504", "监控视频不存在");
112
			return CommonResponse.fail("504", "监控视频不存在");
112
		}
113
		}
113
114
		EbcMonitorVideoLog ebcMonitorVideoLog = getEbcMonitorVideoLog(response.getData());
115
		return CommonResponse.ok(ebcMonitorVideoLog);
114
		
115
		//EbcMonitorVideoLog ebcMonitorVideoLog = getEbcMonitorVideoLog(response.getData());
116
		//return CommonResponse.ok(ebcMonitorVideoLog);
117
		return queryMonitorVideoLogByTimeForM3u8(response.getData());
116
	}
118
	}
117
119
118
	@Override
120
	@Override
119
	public CommonResponse<List<EbcMonitorVideoLog>> getMonitorVideoLogByPictureTime(String imageTime,
121
	public CommonResponse<String> getMonitorVideoLogByPictureTime(String imageTime,
120
			String resourceToolId) throws Exception {
122
			String resourceToolId) throws Exception {
121
		Map<String, Object> conditionMap = new HashMap<String, Object>();
123
		MonitorVideoLog monitorVideoLogCondition = new MonitorVideoLog();
124
		monitorVideoLogCondition.setResourceToolId(resourceToolId);
125
		monitorVideoLogCondition.setBeginTime(DateUtil.convertDate(imageTime));
126
		monitorVideoLogCondition.setEndTime(DateUtil.convertDate(imageTime));
127
		
128
		return queryMonitorVideoLogByTimeForM3u8(monitorVideoLogCondition);
129
		
130
		
131
		/*Map<String, Object> conditionMap = new HashMap<String, Object>();
122
		conditionMap.put("resourceToolId", resourceToolId);
132
		conditionMap.put("resourceToolId", resourceToolId);
123
		conditionMap.put("imageTime", imageTime);
133
		conditionMap.put("imageTime", imageTime);
124
		CommonRequest<Map<String, Object>> conditionMapRequest = new CommonRequest<Map<String, Object>>(conditionMap);
134
		CommonRequest<Map<String, Object>> conditionMapRequest = new CommonRequest<Map<String, Object>>(conditionMap);
125
		CommonResponse<List<MonitorVideoLog>> response = monitorSceneQuery.selectMonitorVideoLog(conditionMapRequest);
135
		CommonResponse<List<MonitorVideoLog>> response = monitorSceneQuery.selectMonitorVideoLog(conditionMapRequest);
126
127
		List<EbcMonitorVideoLog> list = new ArrayList<EbcMonitorVideoLog>();
136
		
128
		if (response == null || CollectionUtils.isEmpty(response.getData())) {
137
		if (response == null || CollectionUtils.isEmpty(response.getData())) {
129
			return CommonResponse.ok(list);
138
			return CommonResponse.ok("");
130
		}
139
		}
131
140
		
132
		for (MonitorVideoLog monitorVideoLog : response.getData()) {
141
		for (MonitorVideoLog monitorVideoLog : response.getData()) {
133
			EbcMonitorVideoLog ebcMonitorVideoLog = getEbcMonitorVideoLog(monitorVideoLog);
142
			EbcMonitorVideoLog ebcMonitorVideoLog = getEbcMonitorVideoLog(monitorVideoLog);
134
			list.add(ebcMonitorVideoLog);
143
			list.add(ebcMonitorVideoLog);
135
		}
144
		}
136
137
		return CommonResponse.ok(list);
145
		
146
		return CommonResponse.ok(list);*/
138
	}
147
	}
139
148
140
	/**
149
	/**

+ 1 - 1
security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/AiIdenLogManageService.java

45
	CommonResponse<Map<String, Object>> queryOneAiIdenLog(Long aiIdenLogId) throws Exception;
45
	CommonResponse<Map<String, Object>> queryOneAiIdenLog(Long aiIdenLogId) throws Exception;
46
46
47
	/**
47
	/**
48
	 * 查询所有设备最后一个识别记录
48
	 * 根据场景ID查询最后一条进出记录
49
	 * @param params
49
	 * @param params
50
	 * @return
50
	 * @return
51
	 * @throws Exception
51
	 * @throws Exception

+ 9 - 3
security-protection-service/src/main/java/com/ai/bss/security/protection/service/interfaces/MonitorVideoLogManageService.java

19
	 * @return
19
	 * @return
20
	 * @throws Exception
20
	 * @throws Exception
21
	 */
21
	 */
22
	@Deprecated
22
	CommonResponse<List<EbcMonitorVideoLog>> queryMonitorVideoLogByTime(MonitorVideoLog monitorVideoLogCondition)
23
	CommonResponse<List<EbcMonitorVideoLog>> queryMonitorVideoLogByTime(MonitorVideoLog monitorVideoLogCondition)
23
			throws Exception;
24
			throws Exception;
24
25
25
26
	/**
27
	 * 按时间段查询监控视频日志
28
	 * @param monitorVideoLogCondition
29
	 * @return
30
	 * @throws Exception
31
	 */
26
	CommonResponse<String> queryMonitorVideoLogByTimeForM3u8(MonitorVideoLog monitorVideoLogCondition) throws Exception;
32
	CommonResponse<String> queryMonitorVideoLogByTimeForM3u8(MonitorVideoLog monitorVideoLogCondition) throws Exception;
27
33
28
	/**
34
	/**
31
	 * @return
37
	 * @return
32
	 * @throws Exception
38
	 * @throws Exception
33
	 */
39
	 */
34
	CommonResponse<EbcMonitorVideoLog> queryMonitorVideoLogById(Long monitorVideoLogId) throws Exception;
40
	CommonResponse<String> queryMonitorVideoLogById(Long monitorVideoLogId) throws Exception;
35
41
36
	/**
42
	/**
37
	 * 根据设备图片时间查询视频日志
43
	 * 根据设备图片时间查询视频日志
40
	 * @return
46
	 * @return
41
	 * @throws Exception
47
	 * @throws Exception
42
	 */
48
	 */
43
	CommonResponse<List<EbcMonitorVideoLog>> getMonitorVideoLogByPictureTime(String imageTime,String resourceToolId) throws Exception;
49
	CommonResponse<String> getMonitorVideoLogByPictureTime(String imageTime,String resourceToolId) throws Exception;
44
	
50
	
45
	/**
51
	/**
46
	 * 创建监控视频日志
52
	 * 创建监控视频日志

+ 3 - 9
security-protection-service/src/main/java/com/ai/bss/security/protection/utils/EbcConstant.java

75
	//AI识别结果:考勤
75
	//AI识别结果:考勤
76
	public static final String AI_IDENTIFY_RESULT_ATTENDANCE= "ATT";
76
	public static final String AI_IDENTIFY_RESULT_ATTENDANCE= "ATT";
77
	
77
	
78
	//AI匹配模型:人脸识别
79
	public static final String AI_MODEL_FACE="FACE";
80
	
78
	//场景关联设备的作用类别:进门识别
81
	//场景关联设备的作用类别:进门识别
79
	public static final String TERMINAL_EFFECT_TYPE_IN="IN";
82
	public static final String TERMINAL_EFFECT_TYPE_IN="IN";
80
	
83
	
93
	//审核状态:未生效(未审核通过)
96
	//审核状态:未生效(未审核通过)
94
	public static final String AUDIT_STATUS_DIS="3";
97
	public static final String AUDIT_STATUS_DIS="3";
95
	
98
	
96
	//AI匹配模型:着装违规识别
97
	public static final String AI_MODEL_CLOTHING_CODE="CLOTHING_CODE";
98
	
99
	//AI匹配模型:人脸识别
100
	public static final String AI_MODEL_FACE="FACE";
101
	
102
	//AI匹配模型:陌生人识别
103
	public static final String AI_MODEL_STRANGER="STRANGER";
104
	
105
	
99
	
106
	// 当前登录者的STAFF_ID
100
	// 当前登录者的STAFF_ID
107
	public static String USPA_USER_STAFF_ID = "201613310867";
101
	public static String USPA_USER_STAFF_ID = "201613310867";