瀏覽代碼

[FE]进出详情里截图完成

liuwenxun 4 年之前
父節點
當前提交
286f4e7586

二進制
security-protection-platform/src/assets/images/Identify_the_successful.png


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

90
            <div>
90
            <div>
91
              <div>
91
              <div>
92
                <!-- 修改-->
92
                <!-- 修改-->
93
                <img src="" alt="" srcset="" style="width:120px;height:160px;border-radius: 5px; ">
93
                <!-- <img src="" alt="" srcset="" style="width:120px;height:160px;border-radius: 5px; "> -->
94
                <div class="scaleimg">
95
                  <div :style="{backgroundImage:style.bgimg,backgroundPosition:style.bgposition,
96
                                transform:style.scale,
97
                                width:style.width,
98
                                height:style.height}" class="imgcontant"></div>
99
                </div>
94
                <div class="bottomimg">抓拍图片</div>
100
                <div class="bottomimg">抓拍图片</div>
95
              </div>
101
              </div>
96
              <div>
102
              <div>
97
                <!-- 修改-->
103
                <!-- 修改-->
98
                <img src="http://img95.699pic.com/photo/50028/0321.jpg_wh300.jpg" alt="" srcset="">
104
                <img src="@/assets/images/Identify_the_successful.png" alt="" srcset="">
99
              </div>
105
              </div>
100
              <div>
106
              <div>
101
                <img :src="rowdata.alarmInfo.headerImage" alt="" srcset="" style="width:100%;height:160px; border-radius: 5px;">
107
                <img :src="rowdata.alarmInfo.headerImage" alt="" srcset="" style="width:100%;height:160px; border-radius: 5px;">
167
      ],
173
      ],
168
      // 当前页
174
      // 当前页
169
      page: 1,
175
      page: 1,
170
      limit: 10
176
      limit: 10,
177
      style: {
178
        bgimg: '',
179
        bgposition: '',
180
        scale: '',
181
        width: '',
182
        height: ''
183

184
      }
171

185

172
    }
186
    }
173
  },
187
  },
175
  mounted () {
189
  mounted () {
176
    // this.gettype()
190
    // this.gettype()
177
    this.getcompanyTypesList()
191
    this.getcompanyTypesList()
178
    // this.search()
179
  },
192
  },
180
  methods: {
193
  methods: {
181
    // 表格中的选择数据
194
    // 表格中的选择数据
201
      var res = await accessapi.getOneInAndOutRecord({ params: { aiIdenLogId: scope.row.aiIdenLogId } })
214
      var res = await accessapi.getOneInAndOutRecord({ params: { aiIdenLogId: scope.row.aiIdenLogId } })
202

215

203
      if (res.data.success) {
216
      if (res.data.success) {
204
        this.detail_modal = true
205
        // this.rowdata = res.data.data
217
        // this.rowdata = res.data.data
206
        this.rowdata.pictureInfo = res.data.data.pictureInfo
218
        this.rowdata.pictureInfo = res.data.data.pictureInfo
207
        this.rowdata.alarmInfo = res.data.data.alarmInfo
219
        this.rowdata.alarmInfo = res.data.data.alarmInfo
220
        this.style.width = res.data.data.alarmInfo.face_box[2] - res.data.data.alarmInfo.face_box[0] + 'px'
221
        // console.log('width是', this.style.width)
222
        this.style.height = res.data.data.alarmInfo.face_box[3] - res.data.data.alarmInfo.face_box[1] + 'px'
223
        // console.log('height是', this.style.height)
224
        this.style.bgimg = 'url(' + res.data.data.pictureInfo.fileUrl + ')'
225
        // console.log('bgimg是', this.style.bgimg)
226
        this.style.bgposition = '' + -res.data.data.alarmInfo.face_box[0] + 'px ' + -res.data.data.alarmInfo.face_box[1] + 'px'
227
        // console.log('bgposition是', this.style.bgposition)
228
        // transform: scale(0.33, 0.33);
229
        var width = res.data.data.alarmInfo.face_box[2] - res.data.data.alarmInfo.face_box[0]
230
        var height = res.data.data.alarmInfo.face_box[3] - res.data.data.alarmInfo.face_box[1]
231
        var scalex = 120 / width
232
        var scaley = 160 / height
233
        // console.log(scalex)
234
        this.style.scale = 'scale(' + scalex + ',' + scaley + ')'
235
        // console.log('scale是', this.style.scale)
208
        // console.log(res.data.data)
236
        // console.log(res.data.data)
209
        // console.log('详情数据是', this.rowdata)
237
        // console.log('详情数据是', this.rowdata)
238

239
        this.detail_modal = true
210
      } else {
240
      } else {
211
        this.$Message.danger('获取数据失败')
241
        this.$Message.danger('获取数据失败')
212
      }
242
      }
398
      > div:nth-child(1) {
428
      > div:nth-child(1) {
399
        width: 120px;
429
        width: 120px;
400
        height: 100%;
430
        height: 100%;
431

432
        .scaleimg {
433
          width: 120px;
434
          height: 160px;
435

436
          position: relative;
437
          .imgcontant {
438
            border-radius: 10px;
439
            background-repeat: no-repeat;
440
            background-attachment: local;
441
            position: absolute;
442
            top: -160px;
443
            left: -120px;
444
          }
445
        }
401
      }
446
      }
402
      > div:nth-child(2) {
447
      > div:nth-child(2) {
403
        width: 117.76px;
448
        width: 117.76px;