Просмотр исходного кода

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

wangchao лет назад: 4
Родитель
Сommit
a517b28942
30 измененных файлов с 683 добавлено и 210 удалено
  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,13 +31,19 @@ public class MonitorManageConsts {
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 37
    public static String AI_MODEL_FACE = "FACE";
38 38
    //陌生人识别
39 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 48
    //AI识别结果:正常
43 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,19 +116,21 @@ public class KafkaProcessImpl implements KafkaProcess {
116 116
				filePath.length());
117 117
		if (fileType.equals(MonitorManageConsts.FILE_TYPE_IMG)) {
118 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 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 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 128
			aiIdenLogDto.setIdenPictureSnapDate(dateTime);
127 129
		}
128 130
		// 文件上传到 minio文件服务器
129 131
		multipartFile = new CommonsMultipartFile(FileUtils.createFileItem(new File(filePath), fileName));
130 132
131
		log.info("保存图片文件");
133
		log.info("保存图片文件:"+fileName);
132 134
		minioFileMap = fileManageService.uploadFile(multipartFile, bucketName, deviceCode, null);
133 135
134 136
		if (fileType.equals(MonitorManageConsts.FILE_TYPE_IMG)) {
@ -157,15 +159,22 @@ public class KafkaProcessImpl implements KafkaProcess {
157 159
					if (MonitorManageConsts.AI_MODEL_FACE.equals(aiIdenModel)) {
158 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 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,7 +440,7 @@ public class KafkaProcessImpl implements KafkaProcess {
431 440
			}
432 441
433 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 444
		} catch (Exception e) {
436 445
			log.error("getResourceToolAllInfo is error");
437 446
		}

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

@ -19,7 +19,29 @@ const api = {
19 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 45
  getEmployeeByOrgid (orgId) {
24 46
    return $default
25 47
      .get(`/sp/workEmployee/queryEmployeeByOrg?orgId=${orgId}`)

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

@ -187,6 +187,9 @@ const api = {
187 187
  },
188 188
  getDepartments() {
189 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,8 +66,11 @@ const api = {
66 66
  // 审核用户照片
67 67
  auditEmployeePicture (params) {
68 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 75
function nest (items, code = '-1', link = 'parentCode') {
73 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,10 +89,10 @@ export default {
89 89
      const icon = onlyOneChild.meta && onlyOneChild.meta.icon ? <t-icon icon={onlyOneChild.meta.icon} /> : ''
90 90
91 91
      if (item.path === '/alarm') {
92
        var confirmedCount = 0
92
        // var confirmedCount = 0
93 93
        var unconfirmedCount = 0
94 94
        if (AiAlarmCount.length > 0) {
95
          confirmedCount = AiAlarmCount[1].value
95
          // confirmedCount = AiAlarmCount[1].value
96 96
          unconfirmedCount = AiAlarmCount[0].value
97 97
        }
98 98
@ -103,7 +103,7 @@ export default {
103 103
104 104
            <div class="badge-group">
105 105
              <t-badge color="danger" count={unconfirmedCount} max={99} ></t-badge>
106
              <t-badge color="danger" count={confirmedCount} max={99} ></t-badge>
106
107 107
            </div>
108 108
109 109
          </t-menu-item>

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

@ -78,6 +78,7 @@ export default {
78 78
      let res = await aialarmapi.getAiAlarmCount()
79 79
80 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,8 +82,9 @@ s<template>
82 82
          <div class="detail_item1">
83 83
            <div>抓拍图片</div>
84 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 88
            </div>
88 89
          </div>
89 90
          <div class="detail_item2">
@ -104,6 +105,7 @@ s<template>
104 105
              <div>
105 106
                <!-- 修改-->
106 107
                <img src="@/assets/images/Identify_the_successful.png" alt="" srcset="">
108

107 109
              </div>
108 110
              <div>
109 111
                <img :src="rowdata.alarmInfo.headerImage" alt="" srcset="" style="width:100%;height:160px; border-radius: 5px;">
@ -185,7 +187,9 @@ export default {
185 187

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

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

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

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

228 237
        this.getImage()
238
        this.getmainimage()
229 239
        // var loadTimer
230 240
        // var imgObject = new Image()
231 241
        // imgObject.setAttribute('crossOrigin', 'anonymous')
@ -291,21 +301,23 @@ export default {
291 301
        var params = this.searchdata
292 302
        params.pageNumber = this.page
293 303
        params.pageSize = this.limit
294
        console.log(params)
304
        // console.log(params)
295 305
        var res = await accessapi.getaccesslist({ params: params })
296 306
        // console.log(res)
297 307
        if (res.status === 200) {
298 308
          // console.log(res)
299 309
          this.data = res.data.data.data
310
          // console.log(this.data)
311
          // console.log(this.companyTypesList)
300 312
          this.data = this.data.map((item) => {
301 313
            // 处理进出时间
302 314
            // item.taskExecuteTime = formatDateTime(item.taskExecuteTime)
303 315
            // 处理相似度
304 316
            // item.simi = this.percentagedata(item.simi)
305 317
            // console.log('公司的数据是', this.companyTypesList)
306
            // console.log('公司id', item)
318
            // console.log('公司id', item.companyId, typeof item.companyId)
307 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 321
            if (item.companyinfo.length > 0) {
310 322
              item.companyname = item.companyinfo[0].name
311 323
            } else {
@ -360,6 +372,7 @@ export default {
360 372
        return true
361 373
      }
362 374
    },
375
    // 处理截图图片
363 376
    async getImage () {
364 377
      var loadTimer
365 378
      var imgObject = new Image()
@ -392,7 +405,57 @@ export default {
392 405
        // console.log(tnCanvas.toDataURL())
393 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,8 +75,10 @@
75 75
        <template slot-scope="scope">
76 76

77 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 82
        </template>
81 83
      </t-table-column>
82 84
    </t-table>
@ -441,6 +443,9 @@ export default {
441 443
    font-size: 14px;
442 444
    line-height: 22px;
443 445
  }
446
  .caozuo {
447
    display: inline;
448
  }
444 449
  .table th,
445 450
  .table td {
446 451
    padding: 0 0 0 21px;

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

@ -8,7 +8,7 @@
8 8
        </div>
9 9
        <div class="keep-row">
10 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 12
        </div>
13 13
        <div class="search-btn">
14 14
          <t-button color="primary" @click="handSearchAttendance">查询</t-button>
@ -84,11 +84,14 @@ export default {
84 84
    const now = new Date()
85 85
    return {
86 86
      form: {
87
        month: formatDateTime(new Date().setMonth(now.getMonth() - 1), 'yyyy-MM'),
88
        userid: null,
89
        depId: '',
90
        orgId: '',
87 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 95
      attendanceModal: false,
93 96
      agreement: '',
94 97
      tableData: [],
@ -98,6 +101,15 @@ export default {
98 101
    }
99 102
  },
100 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 113
    handleInited() {
102 114
      this.getTableData()
103 115
    },

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

@ -1,9 +1,28 @@
1 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 22
</template>
4 23
5 24
<script>
6
import commonapi from '@/api/common'
25
import commonApi from '@/api/common'
7 26
export default {
8 27
  props: {
9 28
    value: {
@ -15,7 +34,14 @@ export default {
15 34
  },
16 35
  data() {
17 36
    return {
18
      source: []
37
      source: [],
38
      // 公司、部门、员工、列表
39
      companyTypesList: [],
40
      departmentTypesList: [],
41
      staffTypesList: [],
42
      companyTypeId: '',
43
      departmentTypeId: '',
44
      staffTypeId: ''
19 45
    }
20 46
  },
21 47
  computed: {
@ -30,54 +56,103 @@ export default {
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 77
  created() {
34
    this.getDepartments()
78
    this.getCompanyTypesList()
35 79
  },
36 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 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 153
    loadStuffData(item, callback) {
79 154
      item.loading = true
80
      commonapi.getEmployeeByOrgid(item.value).then(res => {
155
      commonApi.getEmployeeByOrgid(item.value).then(res => {
81 156
        console.log(res)
82 157
        let arr = []
83 158

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

@ -11,7 +11,7 @@
11 11
            </div>
12 12
            <div class="keep-row">
13 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 15
            </div>
16 16
            <div class="search-btn">
17 17
              <t-button color="primary" @click="handSearchDay">查询</t-button>
@ -41,7 +41,7 @@
41 41
            </div>
42 42
            <div class="keep-row">
43 43
              <span>部门/员工:</span>
44
              <dept-staff-cascader v-model="monthlyForm" />
44
              <dept-staff-cascader v-model="monthlyForm" @getOrgId="getMonthOrgId" @getDepId="getMonthDepId" @getStaffId="getMonthStaffId" />
45 45
            </div>
46 46
            <div class="search-btn">
47 47
              <t-button color="primary" @click="handSearchMonth">查询</t-button>
@ -113,7 +113,6 @@ import atdapi from '@/api/attendance'
113 113
import formatDateTime from '@/utils/formatDateTime.js'
114 114
import AttendanceDialog from '../components/AttendanceDialog'
115 115
import DeptStaffCascader from '../components/DeptStaffCascader'
116
117 116
export default {
118 117
  components: { AttendanceDialog, DeptStaffCascader },
119 118
  data () {
@ -128,7 +127,10 @@ export default {
128 127
      loadDetail: false,
129 128
      loadDailyTable: false,
130 129
      loadMonthTable: false,
131
130
      // 公司、部门、员工、列表
131
      companyTypesList: [],
132
      departmentTypesList: [],
133
      getStaffTypesList: [],
132 134
      monthlyTotal: 0,
133 135
      dailyTotal: 0,
134 136
      monthlyForm: {
@ -150,6 +152,24 @@ export default {
150 152
    }
151 153
  },
152 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 173
    handleDailyInited () {
154 174
      // this.getDailyTable()
155 175
    },
@ -178,6 +198,68 @@ export default {
178 198
      this.monthlyForm.current = val
179 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 264
    resetDailyData() {
183 265
      this.$nextTick(() => {

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

@ -1,6 +1,6 @@
1 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 4
    <template slot="header">
5 5
      <div class="device-modal-title">{{ isEdit?'设备编辑':'设备新增' }}</div>
6 6
    </template>
@ -21,9 +21,12 @@
21 21
          <t-option v-for="item in types" :value="item.id" :key="item.id">{{ item.name }}</t-option>
22 22
        </t-select>
23 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 27
      <t-form-item label="图片上传:">
25 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 30
            <div style="width: 180px;height:180px;line-height: 180px">
28 31
              <t-icon icon="plus-outline" size="40"></t-icon>
29 32
            </div>
@ -46,6 +49,7 @@ const defaultAddDeviceModalForm = {
46 49
  deviceId: '', // 设备id
47 50
  deviceName: '', // 设备名称
48 51
  deviceTypeId: '', // 设备类型id
52
  videoUrl: '', // 视频地址
49 53
  pictureUrl: '' // 图片标识
50 54
}
51 55
export default {
@ -79,6 +83,9 @@ export default {
79 83
        deviceName: [
80 84
          { required: true, message: '设备名称不能为空', trigger: 'blur' }
81 85
        ],
86
        videoUrl: [
87
          { required: true, message: '视频地址不能为空', trigger: 'blur' }
88
        ],
82 89
        deviceTypeId: [
83 90
          { required: true, message: '设备类型不能为空' }
84 91
        ]
@ -187,10 +194,9 @@ export default {
187 194
      console.log(file)
188 195
    },
189 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 199
      // 因为演示用的上传服务器返回数据格式的原因,这里模拟添加 url
193
      console.log(file)
194 200
      this.uploadList.push(file)
195 201
    },
196 202
    $_onUploadRemoveFile () { },

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

@ -30,7 +30,7 @@
30 30
          <div>
31 31
            <img
32 32
              :class="item.resourceToolId == form.resourceToolId ? 'hover' : ''"
33
              :src="item.pictureUrl"
33
              :src="item.imageUrl"
34 34
              style="height: 120px; width: 158px"
35 35
              alt=""
36 36
            />
@ -129,10 +129,20 @@ export default {
129 129
        nameAsLike: this.searchValue // 设备名称(模糊匹配)
130 130
      }
131 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 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 146
    groupClick(item) {
137 147
      // 选中更换摄像头
138 148
      this.form.resourceToolName = item.resourceToolName

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

@ -1,59 +1,80 @@
1 1
<template>
2
  <t-modal :visibled.sync="isVisibled" :mask-closable="false">
2
  <t-modal :visibled.sync="isVisibled" :mask-closable="false" width="600px">
3 3
    <template slot="header">
4 4
      <div class="device-modal-title">{{ isEdit?'用户编辑':'新增用户' }}</div>
5 5
    </template>
6 6
    <t-form ref="addUserModal" :model="addUserModal" :rules="addUserModalRules" label-position="right">
7 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 9
      </t-form-item>
10 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 12
      </t-form-item>
13 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 15
          <t-option v-for="(item,index) in companyList" :value="item.id" :key="index">{{ item.name }}</t-option>
16 16
        </t-select>
17 17
      </t-form-item>
18 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 20
      </t-form-item>
21 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 23
          <t-option v-for="(item,index) in jobPoisitonList" :value="item.code" :key="index">{{ item.value }}</t-option>
24 24
        </t-select>
25 25
      </t-form-item>
26 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 28
      </t-form-item>
29 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 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 72
        <span style="color:rgba(0, 0, 0, 0.45);font-size:12px">照片格式:jpg、png或bmp文件,且不超过2M</span>
52 73
      </t-form-item>
53 74
    </t-form>
54 75
    <template slot="footer">
55 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 78
      <t-button v-else color="primary" @click="submitModalData">提交</t-button>
58 79
    </template>
59 80
  </t-modal>
@ -61,6 +82,7 @@
61 82
62 83
<script>
63 84
import sysapi from '@/api/usermana'
85
import formatDateTime from '@/utils/formatDateTime.js'
64 86
export default {
65 87
  props: {
66 88
    visible: {
@ -71,20 +93,27 @@ export default {
71 93
    companyList: {
72 94
      type: Array,
73 95
      default: () => []
96
    },
97
    // 回显数据列表
98
    editUserModal: {
99
      type: Object,
100
      default: () => []
74 101
    }
75 102
  },
76 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 114
    return {
115
      // 按钮是否加载中
116
      loadingSubmit: false,
88 117
      // 是否为编辑状态
89 118
      isEdit: false,
90 119
      // 部门列表
@ -92,6 +121,8 @@ export default {
92 121
      // 职务列表
93 122
      uploadList: [],
94 123
      jobPoisitonList: [],
124
      // 回显图片
125
      showPicture: '',
95 126
      // 新增用户表单
96 127
      addUserModal: {
97 128
        name: '',
@ -121,10 +152,10 @@ export default {
121 152
          { required: true, message: '职务不能为空', trigger: 'change' }
122 153
        ],
123 154
        birthday: [
124
          { required: true, message: '年龄不能为空', trigger: 'blur' }
155
          { required: true, message: '年龄不能为空' }
125 156
        ],
126 157
        mainWirelessCall: [
127
          { required: true, message: '请输入11位手机号', trigger: 'blur' }
158
          { validator: VALIDATEPASSCHECK, required: true, trigger: 'blur' }
128 159
        ],
129 160
        facePicture: [
130 161
          { required: true, message: '图片不能为空', trigger: 'blur' }
@ -149,6 +180,9 @@ export default {
149 180
      this.addUserModal.organizeCode = ''
150 181
      // 查询部门列表
151 182
      this.queryCycleChildOrg(val)
183
    },
184
    editUserModal () {
185
      this.getCompanyList()
152 186
    }
153 187
  },
154 188
  mounted() {
@ -166,14 +200,14 @@ export default {
166 200
            organizeCode: this.addUserModal.organizeCode, // 部门CODE
167 201
            mainWirelessCall: this.addUserModal.mainWirelessCall, // 手机号码
168 202
            mainJobPosition: this.addUserModal.mainJobPosition, // 职务
169
            field1: this.addUserModal.facePicture, // 照片标识
203
            field1: this.addUserModal.field1, // 照片标识
170 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 208
            if (res.data.success === true) {
176
              this.$Message.success('新增成功')
209
              this.$Message.success('提交成功')
210
              this.$refs['addUserModal'].resetFields()
177 211
            } else {
178 212
              console.log(res.data.fail.message)
179 213
              this.$Message.success(res.data.fail.message)
@ -182,11 +216,56 @@ export default {
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 246
    resetModalData () {
187 247
      this.$refs['addUserModal'].resetFields()
188 248
      this.imgUrl = ''
249
      this.isEdit = false
189 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 271
    async getJobPositionList() {
@ -212,7 +291,7 @@ export default {
212 291
          if (item.pid === '-1') {
213 292
            delete item.pid
214 293
          }
215
          item.id = item.orgId
294
          // item.id = item.orgId
216 295
          data1.some((item1) => {
217 296
            if (item.pid === item1.id) {
218 297
              item.pid = item1.orgId
@ -223,6 +302,9 @@ export default {
223 302
        })
224 303
        // eslint-disable-next-line no-return-assign
225 304
        this.departmentTypesList = data.filter(item => item.data = item.id)
305
        this.$nextTick(() => {
306
          this.addUserModal.organizeCode = this.editUserModal.organizationCode
307
        })
226 308
      } else {
227 309
        this.$Message.danger('部门类型列表数据获取失败!')
228 310
      }
@ -237,7 +319,8 @@ export default {
237 319
            orgId: item.id + '',
238 320
            id: item.code,
239 321
            label: item.name,
240
            pid: item.parentCode
322
            pid: item.parentCode,
323
            data: item.code
241 324
          })
242 325
          this.nextDepartment(item.departments, arr)
243 326
        })
@ -257,11 +340,9 @@ export default {
257 340
      console.log(file)
258 341
    },
259 342
    $_onUploadSuccess (res, file) {
260
      this.imgUrl = res.data.data.toolPictureUrl
261
      this.addDeviceModalForm.pictureUrl = res.data.data.pictureUrl
262 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 347
    $_onUploadRemoveFile () { },
267 348
    $_onUploadExceededSize () { },
@ -305,8 +386,33 @@ export default {
305 386
<style lang="scss" scoped>
306 387
.demo-upload-list{
307 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 417
.picture-upload{
312 418
  display:flex;

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

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

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

@ -70,10 +70,10 @@ export default {
70 70
      videoList: [],
71 71
      // 视频播放器对象
72 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 77
      isShow: true,
78 78
      playerOptions: {
79 79
        playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度

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

@ -44,10 +44,14 @@
44 44
        </div>
45 45
      </div>
46 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 55
      </div>
52 56
    </div>
53 57
  </div>
@ -65,6 +69,7 @@ export default {
65 69
      devicePosition: '',
66 70
      distinguishUrl: '',
67 71
      dataImg: [],
72
      dataImgList: [],
68 73
      fileNameIndex: 0,
69 74
      playerOptions: {
70 75
        playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度
@ -116,12 +121,13 @@ export default {
116 121
      }
117 122
      var flag = this.startreend(this.startDate, this.endDate)
118 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 125
        sysapi.getDistinguishData(data).then(res => {
121 126
          console.log(res.data)
122 127
          this.dataImg = res.data.data
123 128
          if (res.data.data.length > 0) {
124 129
            this.getParticularsData(res.data.data[0].aiIdenLogId, 0)
130
            this.dataImgList = this.arrayGroup(res.data.data, 10)
125 131
          } else {
126 132
            this.devicePosition = ''
127 133
            this.defineResult = ''
@ -135,6 +141,14 @@ export default {
135 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 153
    stringtodate (date) {
140 154
      date = date.substring(0, 19)
@ -240,16 +254,22 @@ export default {
240 254
            display: flex;
241 255
            .image-carousel{
242 256
              display: flex;
257
              width: 9%;
258
              height: 80%;
243 259
              flex-direction: column;
244 260
              .img-viewer-size{
245 261
                cursor:pointer;
246
                width: 132px;
247
                height: 88px;
262
                width: 100%;
263
                height: 100%;
248 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 274
.fileName{
255 275
  color: #009bf3;

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

@ -1,7 +1,7 @@
1 1
<template>
2 2
  <div class="page-main">
3 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 5
        {{ item.monitorSceneName }}
6 6
      </t-button>
7 7
    </t-button-group>
@ -125,7 +125,7 @@ export default {
125 125
          btn1.className = 'aidicon aidicon-piechart-outline'
126 126
          btn1.setAttribute('title', '视频回放')
127 127
          btn1.addEventListener('click', () => {
128
            this.handleReview(this.videoList[index].id)
128
            this.handleReview(this.videoList[index].resourceToolId)
129 129
          })
130 130
          item.appendChild(txt)
131 131
          item.appendChild(btn)
@ -141,20 +141,20 @@ export default {
141 141
        if (element.id === this.gateFieldData) {
142 142
          sysapi.getMonitorScene(this.organizationList[index].id).then((resp) => {
143 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,7 +169,6 @@ export default {
169 169
      }
170 170
      if (res.status === 200) {
171 171
        this.replayList = res.data.data
172
        console.log(this.replayList)
173 172
      } else {
174 173
        this.$Message.danger('视频列表数据获取失败!')
175 174
      }
@ -181,7 +180,20 @@ export default {
181 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 197
      this.selectedMonitorScene = id
186 198
      this.paramsObj.page = 0
187 199
      this.videoList = []
@ -207,11 +219,14 @@ export default {
207 219
    },
208 220
    // 获得风场大门数据
209 221
    getVideoSurveillanceData () {
222
      this.videoList = []
223
      this.videoOptions = []
210 224
      var id = this.tabId
211 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 230
          let obj = {
216 231
            autoplay: true, // 如果true,浏览器准备好时开始回放。
217 232
            muted: true, // 默认情况下将会消除任何音频。
@ -229,7 +244,7 @@ export default {
229 244
            sources: [{
230 245
              withCredentials: false,
231 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 249
            flash: { hls: { withCredentials: false } },
235 250
            html5: { hls: { withCredentials: false } },

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

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

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

@ -46,6 +46,7 @@ public class AiIdenLogManageController {
46 46
		params.put("endTime", attendanceReport.getEndDay());
47 47
		params.put("relateEmployeeNameAsLike", attendanceReport.getNameAsLike());
48 48
		params.put("aiIdenModel", EbcConstant.AI_MODEL_FACE);
49
		params.put("idenResultType", EbcConstant.AI_IDENTIFY_RESULT_ATTENDANCE);
49 50
50 51
		return aiIdenLogManageService.queryPageAiIdenLog(params, pageNumber, pageSize);
51 52
	}
@ -73,7 +74,7 @@ public class AiIdenLogManageController {
73 74
		params.put("beginTime", attendanceReport.getBeginDay());
74 75
		params.put("endTime", attendanceReport.getEndDay());
75 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 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,7 +75,7 @@ public class InAndOutRecordController {
75 75
	}
76 76
	
77 77
	/**
78
	 * 首页查询进出记录
78
	 * 查询首页进出记录
79 79
	 * @return
80 80
	 * @throws Exception
81 81
	 */

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

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

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

@ -164,17 +164,19 @@ public class AiAlarmManageServiceImpl implements AiAlarmManageService {
164 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 168
		EbcMonitorVideoLog ebcMonitorVideoLog=null;
169 169
		if (!CollectionUtils.isEmpty(logsList)) {
170 170
			ebcMonitorVideoLog=logsList.get(0);
171 171
			ebcMonitorVideoLog.setVideoFileUrl(uploadFileService.getFileUrl(ebcMonitorVideoLog.getVideoUrl()));
172
		}
172
		}*/
173
		String videoFileUrl =monitorVideoLogManageService.getMonitorVideoLogByPictureTime(pictureMap.get("fileDateTimeStr"), workTaskSafetyAlarmMap.get("resourceToolId")).getData();
173 174
		
174 175
		Map<String,Object> resultMap= new HashMap<String, Object>();
175 176
		resultMap.put("alarmInfo", workTaskSafetyAlarmMap);
176 177
		resultMap.put("pictureInfo", pictureMap);
177
		resultMap.put("videoInfo", ebcMonitorVideoLog);
178
		//resultMap.put("videoInfo", ebcMonitorVideoLog);
179
		resultMap.put("videoInfo", videoFileUrl);
178 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,19 +252,23 @@ public class AiIdenLogManageServiceImpl implements AiIdenLogManageService {
252 252
		Map<String, String> pictureMap = uploadFileService.getFileUrlToMap(aiIdenLog.getIdenPictureUrl());
253 253
254 254
		// 视频信息
255
		List<EbcMonitorVideoLog> logsList = monitorVideoLogManageService
255
		/*List<EbcMonitorVideoLog> logsList = monitorVideoLogManageService
256 256
				.getMonitorVideoLogByPictureTime(pictureMap.get("fileDateTimeStr"), aiIdenLog.getResourceToolId())
257 257
				.getData();
258 258
		EbcMonitorVideoLog ebcMonitorVideoLog = null;
259 259
		if (!CollectionUtils.isEmpty(logsList)) {
260 260
			ebcMonitorVideoLog = logsList.get(0);
261 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 267
		Map<String, Object> resultMap = new HashMap<String, Object>();
265 268
		resultMap.put("alarmInfo", aiIdenLogInfoMap);
266 269
		resultMap.put("pictureInfo", pictureMap);
267
		resultMap.put("videoInfo", ebcMonitorVideoLog);
270
		//resultMap.put("videoInfo", ebcMonitorVideoLog);
271
		resultMap.put("videoInfo", videoFileUrl);
268 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,12 +106,17 @@ public class EmployeeManagementServiceImpl implements EmployeeManagementService
106 106
		resultMap.put("organizationCode", response.getData().getOrganizeCode());
107 107
		resultMap.put("organizationName", response.getData().getOrgName());
108 108
		resultMap.put("age", response.getData().getAge());
109
		
109 110
		resultMap.put("mainWirelessCall", response.getData().getMainWirelessCall());
110 111
		resultMap.put("field1", response.getData().getField1()); // 头像标识
111 112
		resultMap.put("field2", response.getData().getField2()); // 审核结果
112 113
		resultMap.put("field3", response.getData().getField3()); // 审核意见
113 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 120
		resultMap.put("pictureUrl",
116 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,6 +46,7 @@ public class MonitorVideoLogManageServiceImpl implements MonitorVideoLogManageSe
46 46
	private SecurityProtectionMinioConfig minioConfig;
47 47
48 48
	@Override
49
	@Deprecated
49 50
	public CommonResponse<List<EbcMonitorVideoLog>> queryMonitorVideoLogByTime(MonitorVideoLog monitorVideoLogCondition)
50 51
			throws Exception {
51 52
		CommonRequest<MonitorVideoLog> request = new CommonRequest<MonitorVideoLog>(monitorVideoLogCondition);
@ -103,38 +104,46 @@ public class MonitorVideoLogManageServiceImpl implements MonitorVideoLogManageSe
103 104
	}
104 105
105 106
	@Override
106
	public CommonResponse<EbcMonitorVideoLog> queryMonitorVideoLogById(Long monitorVideoLogId) throws Exception {
107
	public CommonResponse<String> queryMonitorVideoLogById(Long monitorVideoLogId) throws Exception {
107 108
		CommonRequest<Long> request = new CommonRequest<Long>(monitorVideoLogId);
108 109
		CommonResponse<MonitorVideoLog> response = monitorSceneQuery.loadMonitorVideoLog(request);
109 110
110 111
		if (response == null || response.getData() == null) {
111 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 120
	@Override
119
	public CommonResponse<List<EbcMonitorVideoLog>> getMonitorVideoLogByPictureTime(String imageTime,
121
	public CommonResponse<String> getMonitorVideoLogByPictureTime(String imageTime,
120 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 132
		conditionMap.put("resourceToolId", resourceToolId);
123 133
		conditionMap.put("imageTime", imageTime);
124 134
		CommonRequest<Map<String, Object>> conditionMapRequest = new CommonRequest<Map<String, Object>>(conditionMap);
125 135
		CommonResponse<List<MonitorVideoLog>> response = monitorSceneQuery.selectMonitorVideoLog(conditionMapRequest);
126
127
		List<EbcMonitorVideoLog> list = new ArrayList<EbcMonitorVideoLog>();
136
		
128 137
		if (response == null || CollectionUtils.isEmpty(response.getData())) {
129
			return CommonResponse.ok(list);
138
			return CommonResponse.ok("");
130 139
		}
131
140
		
132 141
		for (MonitorVideoLog monitorVideoLog : response.getData()) {
133 142
			EbcMonitorVideoLog ebcMonitorVideoLog = getEbcMonitorVideoLog(monitorVideoLog);
134 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,7 +45,7 @@ public interface AiIdenLogManageService {
45 45
	CommonResponse<Map<String, Object>> queryOneAiIdenLog(Long aiIdenLogId) throws Exception;
46 46
47 47
	/**
48
	 * 查询所有设备最后一个识别记录
48
	 * 根据场景ID查询最后一条进出记录
49 49
	 * @param params
50 50
	 * @return
51 51
	 * @throws Exception

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

@ -19,10 +19,16 @@ public interface MonitorVideoLogManageService {
19 19
	 * @return
20 20
	 * @throws Exception
21 21
	 */
22
	@Deprecated
22 23
	CommonResponse<List<EbcMonitorVideoLog>> queryMonitorVideoLogByTime(MonitorVideoLog monitorVideoLogCondition)
23 24
			throws Exception;
24 25
25
26
	/**
27
	 * 按时间段查询监控视频日志
28
	 * @param monitorVideoLogCondition
29
	 * @return
30
	 * @throws Exception
31
	 */
26 32
	CommonResponse<String> queryMonitorVideoLogByTimeForM3u8(MonitorVideoLog monitorVideoLogCondition) throws Exception;
27 33
28 34
	/**
@ -31,7 +37,7 @@ public interface MonitorVideoLogManageService {
31 37
	 * @return
32 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,7 +46,7 @@ public interface MonitorVideoLogManageService {
40 46
	 * @return
41 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,6 +75,9 @@ public class EbcConstant {
75 75
	//AI识别结果:考勤
76 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 82
	public static final String TERMINAL_EFFECT_TYPE_IN="IN";
80 83
	
@ -93,15 +96,6 @@ public class EbcConstant {
93 96
	//审核状态:未生效(未审核通过)
94 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 100
	// 当前登录者的STAFF_ID
107 101
	public static String USPA_USER_STAFF_ID = "201613310867";