c3e3dc32606fL50">50 51

51
          <t-tag v-if="scope.row.state=== '处理中'" state="info">{{ scope.row.state }}</t-tag>
52
          <t-tag v-if="scope.row.state=== '未确认'" state="warning">{{ scope.row.state }}</t-tag>
53
          <t-tag v-if="scope.row.state=== '已处理'" state="success">{{ scope.row.state }}</t-tag>
52
          <t-tag v-if="scope.row.status=== 'RUN'" state="info">处理中</t-tag>
53
          <t-tag v-if="scope.row.status=== 'INI'" state="warning">未确认</t-tag>
54
          <t-tag v-if="scope.row.status=== 'END'" state="success">已处理</t-tag>
55
          <t-tag v-if="scope.row.status=== 'FAL'" state="danger">误报</t-tag>
54 56
        </template>
55 57
      </t-table-column>
56
      <t-table-column label="报警类型" prop="type">
58
      <t-table-column label="报警类型" prop="alarmTypeName">
57 59
      </t-table-column>
58
      <t-table-column label="报警描述" prop="describe" width="110">
60
      <t-table-column label="报警描述" prop="alarmMemo" width="110">
59 61
      </t-table-column>
60
      <t-table-column label="设备名称" prop="equipment_name" width="110">
62
      <t-table-column label="设备名称" prop="resourceToolName" width="110">
61 63
      </t-table-column>
62
      <t-table-column label="设备编号" prop="equipment_number" width="90">
64
      <t-table-column label="设备编号" prop="resourceToolCode" width="90">
63 65
      </t-table-column>
64
      <t-table-column label="设备位置" prop="equipment_location" width="120">
66
      <t-table-column label="设备位置" prop="monitorSceneName" width="120">
65 67
      </t-table-column>
66
      <t-table-column label="报警时间" prop="alarm_time" width="148px">
68
      <t-table-column label="报警时间" prop="aiIdenTime" width="148px">
67 69
      </t-table-column>
68
      <t-table-column label="处理人" prop="Handler" width="70">
70
      <t-table-column label="处理人" prop="workEmployeeRoleName" width="70">
69 71
      </t-table-column>
70
      <t-table-column label="处理时间" prop="processing_time" width="148px">
72
      <t-table-column label="处理时间" prop="processTime" width="148px">
71 73
      </t-table-column>
72 74
      <t-table-column label="操作">
73 75
        <template slot-scope="scope">
74 76

75 77
          <a href="javascript:void(0)" size="sm" style="color:#0089D4" @click="handleClick(scope,0)">详情</a>
76
          <a v-if="scope.row.state=='处理中'" style="color:#0089D4" @click="handleClick(scope,1)">关闭</a>
77
          <a v-if="scope.row.state=='未确认'" style="color:#0089D4" @click="handleClick(scope,1)">处理</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 80
        </template>
79 81
      </t-table-column>
80 82
    </t-table>
@ -90,67 +92,68 @@
90 92
          <div class="detail">
91 93
            <label class="detail_title">状态:</label>
92 94
            <div class="detail_content">
93
              <t-tag v-if="currentdata.data.state==='未确认'" state="warning">{{ currentdata.data.state }}</t-tag>
94
              <t-tag v-if="currentdata.data.state==='已处理'" state="success">{{ currentdata.data.state }}</t-tag>
95
              <t-tag v-if="currentdata.data.state==='处理中'" state="info">{{ currentdata.data.state }}</t-tag>
95
              <t-tag v-if="currentdata.data.status==='INI'" state="warning">未确认</t-tag>
96
              <t-tag v-if="currentdata.data.status==='END'" state="success">已处理</t-tag>
97
              <t-tag v-if="currentdata.data.status==='RUN'" state="info">处理中</t-tag>
98
              <t-tag v-if="currentdata.data.status==='FAL'" state="danger">误报</t-tag>
96 99
            </div>
97 100

98 101
          </div>
99 102
          <div class="detail">
100 103
            <label class="detail_title">报警类型:</label>
101
            <div class="detail_content">{{ currentdata.data.type }}</div>
104
            <div class="detail_content">{{ currentdata.data.alarmTypeName }}</div>
102 105
          </div>
103 106
          <div class="detail">
104 107
            <label class="detail_title">报警描述:</label>
105
            <div class="detail_content">{{ currentdata.data.describe }}</div>
108
            <div class="detail_content">{{ currentdata.data.alarmMemo }}</div>
106 109
          </div>
107 110
          <div class="detail">
108 111
            <label class="detail_title">报警时间:</label>
109
            <div class="detail_content">{{ currentdata.data.alarm_time }}</div>
112
            <div class="detail_content">{{ currentdata.data.aiIdenTime }}</div>
110 113
          </div>
111 114

112 115
          <div class="detail">
113 116
            <label class="detail_title">设备编号:</label>
114
            <div class="detail_content">{{ currentdata.data.equipment_name }}</div>
117
            <div class="detail_content">{{ currentdata.data.resourceToolCode }}</div>
115 118
          </div>
116 119
          <div class="detail">
117 120
            <label class="detail_title">设备位置:</label>
118
            <div class="detail_content">{{ currentdata.data.equipment_location }}</div>
121
            <div class="detail_content">{{ currentdata.data.monitorSceneName }}</div>
119 122
          </div>
120 123

121 124
          <div class="detail">
122 125
            <label class="detail_title">处理人:</label>
123
            <div class="detail_content">{{ currentdata.data.Handler }}</div>
126
            <div class="detail_content">{{ currentdata.data.workEmployeeRoleName }}</div>
124 127
          </div>
125 128

126 129
          <div class="detail">
127 130
            <label class="detail_title">处理时间:</label>
128
            <div>{{ currentdata.data.processing_time }}</div>
131
            <div>{{ currentdata.data.processTime }}</div>
129 132
          </div>
130 133
        </div>
131 134

132 135
        <div class="details_item2">
133 136
          <div>
134 137
            <div>识别图片</div>
135
            <div><img :src="currentdata.data.picture_url" alt="" srcset="" style="width:100%;height:100%"></div>
138
            <div><img :src="currentdata.data.idenPictureUrl" alt="" srcset="" style="width:100%;height:100%"></div>
136 139
          </div>
137 140
          <div>
138 141
            <div>识别视频</div>
139 142
            <div>
140
              <video :src="currentdata.data.video_url" class="video" controls></video>
143
              <video :src="currentdata.data.idenVideoUrl" class="video" controls></video>
141 144
            </div>
142 145
          </div>
143 146
        </div>
144 147
        <div v-if="clickdetail==1">
145
          <div v-if="currentdata.data.state!='已处理'" class="radio">
148
          <div v-if="currentdata.data.status!='END'" class="radio">
146 149
            <div>报警处理 : </div>
147
            <div v-if="currentdata.data.state=='未确认'">
148
              <t-radio-group v-model="msg">
149
                <t-radio label="确认">
150
            <div v-if="currentdata.data.status=='INI'">
151
              <t-radio-group v-model="status">
152
                <t-radio label="RUN">
150 153

151 154
                  <span>确认</span>
152 155
                </t-radio>
153
                <t-radio label="误判">
156
                <t-radio label="FAL">
154 157

155 158
                  <span>误判</span>
156 159
                </t-radio>
@ -158,9 +161,9 @@
158 161
              </t-radio-group>
159 162
            </div>
160 163

161
            <div v-if="currentdata.data.state=='处理中'">
162
              <t-radio-group v-model="msg">
163
                <t-radio label="关闭">关闭</t-radio>
164
            <div v-if="currentdata.data.status=='RUN'||currentdata.data.status=='FAL'">
165
              <t-radio-group v-model="status">
166
                <t-radio label="END">关闭</t-radio>
164 167
              </t-radio-group>
165 168

166 169
            </div>
@ -188,21 +191,22 @@
188 191
<script>
189 192

190 193
import aialarmapi from '@/api/aialarm'
194
import formatDateTime from '@/utils/formatDateTime.js'
191 195
export default {
192 196

193 197
  data () {
194 198
    return {
195 199
      searchdata: {
196
        typeid: '', // 报警类型
197
        Police: '', // 报警人
198
        starttime: '', // 开始时间
199
        endtime: '' // 结束时间
200
        alarmTypeCode: '', // 报警类型
201
        beginTime: '', // 开始时间
202
        endTime: '' // 结束时间
200 203
      },
201 204
      // 报警类型
202 205
      alarmtypelist: [],
203 206
      // 报警人
207
      aialarmhandlerlist: [],
204 208
      // 模态框中的单选按钮
205
      msg: '',
209
      status: '',
206 210
      // 模态框
207 211
      details_modal: false,
208 212
      // 当前行的数据
@ -215,20 +219,23 @@ export default {
215 219
      // 判断是详情还是处理
216 220
      clickdetail: 0,
217 221
      // 一页的数据
218
      data: [
219
        orkTaskId': '202012031206570506796', // {
220
        //   state: '处理中',
221
        //   type: '身份异常',
222
        //   describe: '未授权车辆',
223
        //   equipment_name: '1#人脸终端',
224
        //   equipment_number: 's00001',
225
        //   equipment_location: '1#风场SVG室',
226
        //   alarm_time: '2020-09-21 16:07:09',
227
        //   Handler: '张三',
228
        //   processing_time: '2020-09-21 16:07:09',
229

230
        // },
231

222
      data: [{
223
        'workTaskId': '202012031206570506796', orkTaskId': '202012031206570506796', //
224
        'status': 'INI', // 状态
225
        'statusTime': '2020-12-03T04:06:58.000+0000', // 状态时间
226
        'processMemo': null, // 处理详情
227
        'alarmTypeCode': 'HAT', // 报警类型
228
        'alarmMemo': '没戴安全帽', // 报警描述
229
        'resourceToolName': null, // 设备名称
230
        'resourceToolCode': null, // 设备编号
231
        'monitorSceneName': '一号工地', // 设备位置
232
        'aiIdenTime': '2020-12-03T04:06:58.000+0000', // 报警时间l
233
        'targetEmployeeRoleId': '1001',
234
        'workEmployeeRoleId': '90001', // 处理人
235
        'processTime': '', // 处理时间
236
        'idenPictureUrl': 'http://pic/2970', // 图片url
237
        'idenVideoUrl': 'http://video/8989' // 视频url
238
      }
232 239
      ],
233 240
      // 页数
234 241
      page: 1,
@ -254,12 +261,12 @@ export default {
254 261
      this.clickdetail = val
255 262
      // 去除模态框中的单选项
256 263

257
      this.msg = ''
264
      this.status = ''
258 265

259 266
      this.details_modal = true // 打开模态框
260 267
      this.currentdata.data = scope.row // 获取当前行的数据
261 268
      this.currentdata.index = scope.$index // 获取当前行的索引
262
      console.log(this.currentdata.data)
269
      // console.log(this.currentdata.data)
263 270
    },
264 271

265 272
    // 未确认状态的模态框的确认按钮 || 处理中状态的模态框的确认按钮
@ -267,9 +274,11 @@ export default {
267 274
      // 获取单选框中的值
268 275
      // console.log(this.msg)
269 276
      // 判断是否选择了单选框
270
      if (this.msg) {
277
      if (this.status) {
271 278
        // 向后端发送数据
272
        this.alarmdispose(this.currentdata.data.id, this.msg)
279
        this.alarmdispose(this.currentdata.data.workTaskId, this.status)
280
        // console.log(this.status)
281
        // console.log(this.currentdata.data.workTaskId)
273 282
        // 关闭模态框
274 283
        this.details_modal = false
275 284
      } else {
@ -277,32 +286,21 @@ export default {
277 286
      }
278 287
    },
279 288

280
    async alarmdispose (id, msg) {
281
      var res = await aialarmapi.dispose({ 'id': id, 'msg': msg })
282
      console.log(res)
289
    async alarmdispose (id, status, processMemo) {
290
      const dict = { 'END': '已解决', 'RUN': '处理中', 'FAL': '误报' }
291

292
      var res = await aialarmapi.dispose({ 'workTaskId': id, 'status': status, 'processMemo': dict.status })
293
      // console.log(res)
283 294
      if (res.status === 200) {
295
        this.$Message.success('操作成功')
284 296
        // console.log(res.data.data)
285
        this.judgeradio(msg)
297
        this.data[this.currentdata.index].status = res.data.data.status
298
        this.data[this.currentdata.index].processTime = res.data.data.doneDate
286 299
      } else {
287 300
        this.$Message.danger('处理失败')
288 301
      }
289 302
    },
290 303

291
    // 判断选择了哪个单选按钮
292
    judgeradio (msg) {
293
      // 未确认的模态框选择了确认
294
      if (msg === '确认') {
295
        this.data[this.currentdata.index].state = '处理中'
296
      }
297
      // 未确认的模态框选择了误判
298
      if (msg === '误判') {
299
        this.$Message.info('未确认的模态框选择了误判')
300
      }
301
      // 处理中的模态框选择了关闭按钮
302
      if (msg === '关闭') {
303
        this.data[this.currentdata.index].state = '已处理'
304
      }
305
    },
306 304
    onChange (val) {
307 305
      // console.log(val)
308 306
      this.page = val
@ -318,25 +316,27 @@ export default {
318 316
      }
319 317
    },
320 318

321
    // 获取报警类型 以及报警人
319
    // 获取报警类型
322 320
    async gettype () {
323 321
      var res = await aialarmapi.getaialarmtype()
324 322
      // console.log(res)
325 323
      if (res.status === 200) {
326
        this.alarmtypelist = res.data.data
327
        console.log(this.alarmtypelist)
324
        // this.alarmtypelist = res.data.data
325
        // console.log(this.alarmtypelist)
326
        // console.log(res.data)
327
        this.alarmtypelist = res.data
328 328
      }
329 329
    },
330 330

331 331
    // 查询数据时
332 332
    async search () {
333
      var flag = this.startreend(this.searchdata.starttime, this.searchdata.endtime)
334
      console.log(flag)
333
      var flag = this.startreend(this.searchdata.beginTime, this.searchdata.endTime)
334
      // console.log(flag)
335 335
      if (flag) {
336 336
        // 查询
337 337
        var params = this.searchdata
338
        params.page = this.page
339
        params.limit = this.limit
338
        params.pageNumber = this.page
339
        params.pageSize = this.limit
340 340

341 341
        var res = await aialarmapi.getaialarmlist({
342 342
          params: params
@ -344,8 +344,12 @@ export default {
344 344

345 345
        // console.log(res)
346 346
        if (res.status === 200) {
347
          this.data = res.data.data
348
          this.total = Math.ceil(res.data.total / this.limit) * 5
347
          this.data = res.data.data.data
348
          // console.log('数据是:', this.data)
349
          this.data = this.data.map((item) => { item.aiIdenTime = formatDateTime(item.aiIdenTime); return item })
350
          // console.log(this.data)
351

352
          this.total = Math.ceil(res.data.data.total / res.data.data.size) * 5
349 353
        } else {
350 354
          this.$Message.danger('数据获取失败')
351 355
        }
@ -393,7 +397,6 @@ export default {
393 397
  .upload {
394 398
    font-size: 14px;
395 399
    line-height: 22px;
396
    margin: 29px 0 25px 0;
397 400
  }
398 401
  .table th,
399 402
  .table td {
@ -403,6 +406,7 @@ export default {
403 406
    display: flex;
404 407
    justify-content: space-between;
405 408
    margin-top: 24px;
409
    margin-bottom: 24px;
406 410
    .title {
407 411
      display: inline-block;
408 412
      width: 70px;

android-share - Nuosi Git Service

ipu的trunk版的android工程和服务端工程。

ognl-2.7.3.jar 234KB