|
@@ -684,6 +684,7 @@ import {
|
|
newSubmit,
|
|
newSubmit,
|
|
getbinNumber,
|
|
getbinNumber,
|
|
getToken,
|
|
getToken,
|
|
|
|
+ getSnapshot,
|
|
getRom
|
|
getRom
|
|
} from '@/model/houseSelfCollect/index'
|
|
} from '@/model/houseSelfCollect/index'
|
|
import { addstorageputList } from '@/model/warehouse/index'
|
|
import { addstorageputList } from '@/model/warehouse/index'
|
|
@@ -1022,7 +1023,7 @@ export default {
|
|
player = new EZUIKit.EZUIKitPlayer({
|
|
player = new EZUIKit.EZUIKitPlayer({
|
|
id: 'video-container', // 视频容器ID
|
|
id: 'video-container', // 视频容器ID
|
|
accessToken: accessToken,
|
|
accessToken: accessToken,
|
|
- url: this.monitorUrl2,
|
|
|
|
|
|
+ url: 'ezopen://open.ys7.com/' + this.monitorUrl2 + '.hd.live',
|
|
template: 'standard',
|
|
template: 'standard',
|
|
width: 550,
|
|
width: 550,
|
|
height: 350,
|
|
height: 350,
|
|
@@ -1054,37 +1055,59 @@ export default {
|
|
// callbackPic(data) {
|
|
// callbackPic(data) {
|
|
// console.log('ressssss', data)
|
|
// console.log('ressssss', data)
|
|
// },
|
|
// },
|
|
- getAPhoto() {
|
|
|
|
|
|
+ async getAPhoto() {
|
|
console.log('getAPhoto')
|
|
console.log('getAPhoto')
|
|
|
|
+ await getSnapshot({
|
|
|
|
+ param: this.monitorUrl2
|
|
|
|
+ })
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then(response => {
|
|
|
|
+ console.log('getSnapshot ', response)
|
|
|
|
+ let b = this.dataURLtoFile(response, 'printImage')
|
|
|
|
+ let formdata = new FormData()
|
|
|
|
+ formdata.append('file', b)
|
|
|
|
+ axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: this.global.uploadPath,
|
|
|
|
+ data: formdata
|
|
|
|
+ }).then(response => {
|
|
|
|
+ console.log('response.data.data.url', response.data.data.url)
|
|
|
|
+ this.photoInfo = response.data.data.url
|
|
|
|
+ if (this.photoInfo) {
|
|
|
|
+ this.coverImgList.push(this.photoInfo)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
// const capCallback = data => {
|
|
// const capCallback = data => {
|
|
// console.log('ressssss', data)
|
|
// console.log('ressssss', data)
|
|
// }
|
|
// }
|
|
// player.handleCapturePicture = this.callbackPic
|
|
// player.handleCapturePicture = this.callbackPic
|
|
// player.capturePicture('default', this.callbackPic)
|
|
// player.capturePicture('default', this.callbackPic)
|
|
// player.capturePicture(`${new Date().getTime()}`, capCallback)
|
|
// player.capturePicture(`${new Date().getTime()}`, capCallback)
|
|
- var capturePicturePromise = player.capturePicture(
|
|
|
|
- `${new Date().getTime()}`
|
|
|
|
- )
|
|
|
|
- capturePicturePromise.then(res => {
|
|
|
|
- console.log('promise 获取 数据', res)
|
|
|
|
- let b = this.dataURLtoFile(
|
|
|
|
- this.transformUint8ArrayToBase64(res.data.fileUint8Array),
|
|
|
|
- 'printImage'
|
|
|
|
- )
|
|
|
|
- let formdata = new FormData()
|
|
|
|
- formdata.append('file', b)
|
|
|
|
- axios({
|
|
|
|
- method: 'post',
|
|
|
|
- url: this.global.uploadPath,
|
|
|
|
- data: formdata
|
|
|
|
- }).then(response => {
|
|
|
|
- console.log('response.data.data.url', response.data.data.url)
|
|
|
|
- this.photoInfo = response.data.data.url
|
|
|
|
- if (this.photoInfo) {
|
|
|
|
- this.coverImgList.push(this.photoInfo)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
|
|
+ // var capturePicturePromise = player.capturePicture(
|
|
|
|
+ // `${new Date().getTime()}`
|
|
|
|
+ // )
|
|
|
|
+ // capturePicturePromise.then(res => {
|
|
|
|
+ // console.log('promise 获取 数据', res)
|
|
|
|
+ // let b = this.dataURLtoFile(
|
|
|
|
+ // this.transformUint8ArrayToBase64(res.data.fileUint8Array),
|
|
|
|
+ // 'printImage'
|
|
|
|
+ // )
|
|
|
|
+ // let formdata = new FormData()
|
|
|
|
+ // formdata.append('file', b)
|
|
|
|
+ // axios({
|
|
|
|
+ // method: 'post',
|
|
|
|
+ // url: this.global.uploadPath,
|
|
|
|
+ // data: formdata
|
|
|
|
+ // }).then(response => {
|
|
|
|
+ // console.log('response.data.data.url', response.data.data.url)
|
|
|
|
+ // this.photoInfo = response.data.data.url
|
|
|
|
+ // if (this.photoInfo) {
|
|
|
|
+ // this.coverImgList.push(this.photoInfo)
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
},
|
|
},
|
|
transformUint8ArrayToBase64(array) {
|
|
transformUint8ArrayToBase64(array) {
|
|
var binary = ''
|
|
var binary = ''
|
|
@@ -1263,7 +1286,7 @@ export default {
|
|
player = new EZUIKit.EZUIKitPlayer({
|
|
player = new EZUIKit.EZUIKitPlayer({
|
|
id: 'video-container', // 视频容器ID
|
|
id: 'video-container', // 视频容器ID
|
|
accessToken: accessToken,
|
|
accessToken: accessToken,
|
|
- url: _this.monitorUrl2,
|
|
|
|
|
|
+ url: 'ezopen://open.ys7.com/' + _this.monitorUrl2 + '.hd.live',
|
|
// simple - 极简版; pcLive-pc直播;pcRec-pc回放;mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
|
|
// simple - 极简版; pcLive-pc直播;pcRec-pc回放;mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
|
|
template: 'standard',
|
|
template: 'standard',
|
|
width: 550,
|
|
width: 550,
|
|
@@ -1602,7 +1625,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
console.log(val)
|
|
console.log(val)
|
|
- this.weighingList.addressUrl = val.addressUrl
|
|
|
|
|
|
+ if (val) {
|
|
|
|
+ this.weighingList.addressUrl = val.addressUrl
|
|
|
|
+ }
|
|
},
|
|
},
|
|
cancel() {
|
|
cancel() {
|
|
if (this.reader) {
|
|
if (this.reader) {
|
|
@@ -1810,9 +1835,40 @@ export default {
|
|
// return
|
|
// return
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
- if (!this.photoInfo) {
|
|
|
|
- this.getAPhoto()
|
|
|
|
|
|
+ let _this = this
|
|
|
|
+ console.log(player)
|
|
|
|
+ if (!_this.photoInfo && _this.monitorUrl2) {
|
|
|
|
+ // this.getAPhoto()
|
|
|
|
+ await getSnapshot({
|
|
|
|
+ param: _this.monitorUrl2
|
|
|
|
+ })
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then(response => {
|
|
|
|
+ console.log('getSnapshot ', response)
|
|
|
|
+ let b = _this.dataURLtoFile(response, 'printImage')
|
|
|
|
+ let formdata = new FormData()
|
|
|
|
+ formdata.append('file', b)
|
|
|
|
+ axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: _this.global.uploadPath,
|
|
|
|
+ data: formdata
|
|
|
|
+ })
|
|
|
|
+ .then(response => {
|
|
|
|
+ console.log('response.data.data.url', response.data.data.url)
|
|
|
|
+ _this.photoInfo = response.data.data.url
|
|
|
|
+ if (_this.photoInfo) {
|
|
|
|
+ _this.coverImgList.push(_this.photoInfo)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .finally(res => {
|
|
|
|
+ _this.doCommit()
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ _this.doCommit()
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ doCommit() {
|
|
this.$confirm('确定保存检斤信息?', '提示', {
|
|
this.$confirm('确定保存检斤信息?', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|