peng
2026-03-18 b89df58e3b783f3d718bd85a3e4c6a3bd9ee353c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<template>
  <div class="reacrd-modal">
    <a-modal centered :footer="null" width="60%" v-model="visibleShow" title="卸油详情" @cancel="cancelClick">
      <a-spin :spinning="spinning" tip="文件下载中请稍等..." class="spin-content">
        <div class="header-card">
          <div>
            <span class="text-title">卸油时间 : </span> {{ dialogInfo.listData.startTime }}
            <span class="text-title"> 至 </span>
            {{ dialogInfo.listData.endTime }}
          </div>
          <div>
            <span class="text-title">卸油时长 : </span> {{ ChangeHourMinutestr(dialogInfo.listData.spandTime) }}
          </div>
          <div><span class="text-title">完成情况 : </span> {{ dialogInfo.listData.complete }}</div>
          <a-button type="primary" size="small" icon="download" @click="recExportXls()">导出</a-button>
        </div>
 
        <!-- 脚部图片 -->
        <div>
          <div class="img-list-title">卸前准备</div>
        </div>
        <div v-if="!dialogInfo.listDetails.find((el) => el.eventPhrase == 1)">无数据</div>
        <div v-else class="foot-list">
          <div class="img-list" v-for="(item, index) in dialogInfo.listDetails" :key="item.id">
            <div v-if="item.eventPhrase == 1" class="img-box">
              <viewer>
                <img :src="item.imgPath" alt="" />
              </viewer>
              <div class="words" :style="{'color':item.eventType==2?'red':''}">{{ item.algorithmName }}</div>
              <div class="bottom-text">{{ item.eventTime }}</div>
            </div>
          </div>
        </div>
        <div>
          <div class="img-list-title">卸油过程</div>
        </div>
        <div v-if="!dialogInfo.listDetails.find((el) => el.eventPhrase == 2)">无数据</div>
        <div v-else class="foot-list">
          <div class="img-list" v-for="(item, index) in dialogInfo.listDetails" :key="item.id">
            <div v-if="item.eventPhrase == 2" class="img-box">
              <viewer>
                <img :src="item.imgPath" alt="" />
              </viewer>
              <div class="words" :style="{'color':item.eventType==2?'red':''}" >{{ item.algorithmName }}</div>
              <div class="bottom-text">{{ item.eventTime }}</div>
            </div>
          </div>
        </div>
        <div>
          <div class="img-list-title">卸后处理</div>
        </div>
        <div v-if="!dialogInfo.listDetails.find((el) => el.eventPhrase == 3)">无数据</div>
        <div v-else class="foot-list">
          <div class="img-list" v-for="(item, index) in dialogInfo.listDetails" :key="item.id">
            <div v-if="item.eventPhrase == 3" class="img-box">
              <viewer>
                <img :src="item.imgPath" alt="" />
              </viewer>
              <div class="words" :style="{'color':item.eventType==2?'red':''}">{{ item.algorithmName }}</div>
              <div class="bottom-text">{{ item.eventTime }}</div>
            </div>
          </div>
        </div>
      </a-spin>
    </a-modal>
  </div>
</template>
<script>
import { ChangeHourMinutestr } from '@/utils/util'
import { downFile } from '@tievd/cube-block/lib/api/manage'
export default {
  created() {},
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
    dialogdetails: {
      type: Object,
      default: {},
    },
  },
  data() {
    return {
      visibleShow: false,
      treedatalist: [
        {
          status: 1,
          name: '油罐车检测',
        },
        {
          status: 2,
          name: '三角木识别',
        },
        {
          status: 1,
          name: '静电夹连接检测11111111111111111111111111111',
        },
        {
          status: 2,
          name: '警示牌识别',
        },
        {
          status: 1,
          name: '灭火器识别',
        },
        {
          status: 2,
          name: '稳油检测',
        },
        {
          status: 1,
          name: '取样检测',
        },
        {
          status: 1,
          name: '安全帽检测',
        },
        {
          status: 1,
          name: '卸油管连接检测',
        },
        {
          status: 1,
          name: '安全帽检测',
        },
        {
          status: 1,
          name: '摸底油检测',
        },
        {
          status: 2,
          name: '安全值守检测',
        },
        {
          status: 1,
          name: '油罐车离开',
        },
        {
          status: 1,
          name: '卸后清洁检测',
        },
        {
          status: 1,
          name: '卸后清洁检测',
        },
      ],
      spinning: false,
      dialogInfo: {
        listData: {},
        listDetails: [
          {
            cameraName: '',
          },
        ],
      },
    }
  },
  watch: {
    visible(val) {
      this.visibleShow = val
    },
    dialogdetails(val) {
      this.dialogInfo = val
      console.log(this.dialogInfo)
    },
  },
  methods: {
    ChangeHourMinutestr,
    // 点击关闭或者是遮罩发射关闭信号给父组件,控制关闭
    cancelClick() {
      this.$emit('modalClose')
    },
    // 记录详情导出
    recExportXls() {
      this.spinning = true
      const { id } = this.dialogInfo.listData
      downFile('/jyz/oiloutRecord/exportWord', { recordId: id }).then((data) => {
        this.spinning = false
        if (!data) {
          this.$message.error('文件下载失败')
          return
        }
        let blob = new Blob([data], { type: 'application/msword;charset=UTF-8' })
        let downloadElement = document.createElement('a')
        let href = window.URL.createObjectURL(blob) //创建下载的链接
        downloadElement.href = href
        downloadElement.download = '卸油记录详情' //下载后文件名
        document.body.appendChild(downloadElement)
        downloadElement.click() //点击下载
        document.body.removeChild(downloadElement) //下载完成移除元素
        window.URL.revokeObjectURL(href) //释放掉blob对象
      })
    },
  },
}
</script>
 
<style lang="less" scoped>
@import '~@assets/less/dialog.less';
.color5c8 {
  color: #5c84fd;
}
.header-card {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px;
  font-size: 16px;
  height: 45px;
  width: 100%;
  background: linear-gradient(40deg, rgba(38, 43, 53, 0.6), rgba(31, 35, 43, 0.6));
  border: 1px solid #343a44;
  box-shadow: 0px 5px 22px 0px rgba(0, 0, 0, 0.1);
  color: #567ae8;
  .text-title {
    color: #fff;
  }
}
.img-list-title {
  font-size: 16px;
  color: #567ae8;
}
.content-card {
  display: flex;
  justify-content: space-between;
  margin-top: 17px;
  font-size: 14px;
  .left-content {
    width: 75%;
    height: 402px;
    position: relative;
    .left-video {
      width: 100%;
      height: 100%;
    }
    .icon-text {
      position: absolute;
      left: 15px;
      top: 12px;
      color: #fff;
      font-size: 12px;
      span {
        display: inline-block;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        margin-right: 5px;
        background: #3eb171;
      }
    }
  }
  .right-content {
    width: 25%;
    margin-left: 19px;
    .top-title {
      font-weight: bolder;
      font-size: 14px;
    }
 
    .trailColor {
      margin: 11px 0;
      width: 100%;
      height: 2px;
      background-color: #343a44;
      position: relative;
      .strokeColor {
        width: 56px;
        height: 2px;
        background-color: #5c84fd;
        position: absolute;
        left: 0;
        top: 0;
      }
    }
 
    .right-progress {
      display: flex;
      justify-content: space-between;
      width: 100%;
      margin-top: 5px;
      font-size: 12px;
      height: 355px;
      padding: 10px;
      background: linear-gradient(40deg, rgba(38, 43, 53, 0.6), rgba(31, 35, 43, 0.6));
      border: 1px solid #343a44;
      box-shadow: 0px 5px 22px 0px rgba(0, 0, 0, 0.1);
      .left-tree {
        color: #5c84fd;
        width: 35%;
        text-align: center;
        .arrowhead-box {
          width: 8px;
          min-height: 34px;
          background-color: #5c84fd;
          margin: 0 auto;
          margin-top: 10px;
        }
        .arrowhead-top {
          height: 145px;
        }
        .arrowhead {
          position: relative;
          height: 0px;
          width: 0px;
          margin: 0 auto;
          border-top: 8px solid #5c84fd;
          border-right: 8px solid transparent;
          border-bottom: 8px solid transparent;
          border-left: 8px solid transparent;
          margin-bottom: 10px;
        }
      }
      .right-tree {
        width: 55%;
        height: 338px;
        overflow-y: auto;
        .status-list {
          display: flex;
          align-items: center;
          line-height: 39px;
          font-size: 14px;
          .icon {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 9px;
          }
          .right-text {
            width: 100%;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
          }
        }
      }
    }
  }
}
.foot-list {
  width: 100%;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  // justify-content: space-between;
  // overflow-y: auto;
 
  .img-list {
    padding-bottom: 10px;
    &:last-child {
      margin-right: 0px;
    }
    .img-box {
      margin-right: 13px;
      display: flex;
      flex-direction: column;
      position: relative;
      img {
        width: 170px;
        object-fit: cover;
      }
      .words {
        width: 110px;
        height: 29px;
        background: rgba(93, 133, 255, 0.6);
        border: 1px solid #5b81f9;
        color: #fff;
        font-size: 14px;
        position: absolute;
        left: 0;
        top: 0;
        text-align: center;
        line-height: 29px;
      }
    }
    .bottom-text {
      margin-top: 11px;
      font-size: 12px;
    }
  }
  .spin-content {
    border: 1px solid #91d5ff;
    background-color: #e6f7ff;
  }
}
</style>