|
@@ -607,6 +607,7 @@ a {
|
|
|
:accessKeySecret="accessKeySecret"
|
|
|
:before-upload="fileWater"
|
|
|
:dir="dirImg"
|
|
|
+ @delete='deleteImage'
|
|
|
@loaded="overUploadImage"
|
|
|
></upload-to-ali>
|
|
|
<span v-if="material.filter(item => item == false).length > 0 && urlListImage.url.length > 0" style="color:red"
|
|
@@ -722,6 +723,7 @@ a {
|
|
|
:accessKeySecret="accessKeySecret"
|
|
|
:before-upload="fileWater"
|
|
|
:dir="dirImg"
|
|
|
+ @delete='deleteImage'
|
|
|
@loaded="overUploadImage"
|
|
|
></upload-to-ali>
|
|
|
<span
|
|
@@ -1404,6 +1406,12 @@ export default {
|
|
|
if (n != '') {
|
|
|
this.getList(n)
|
|
|
}
|
|
|
+ },
|
|
|
+ visibleDetail:function(n,o){
|
|
|
+ if(!n){
|
|
|
+ this.refuseFile = []
|
|
|
+ this.refuseReason = ''
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -1678,6 +1686,8 @@ export default {
|
|
|
// })
|
|
|
this.$message.success('水印素材生成中')
|
|
|
this.visibleDetail = false
|
|
|
+ this.refuseFile = []
|
|
|
+ this.refuseReason = ''
|
|
|
closeAllVideoFun()
|
|
|
this.loadData()
|
|
|
}
|
|
@@ -1744,6 +1754,7 @@ export default {
|
|
|
},
|
|
|
okEditShow(item, editStatus) {
|
|
|
if (editStatus == '2') {
|
|
|
+
|
|
|
var params = {}
|
|
|
params.id = item.id
|
|
|
params.auditorId = this.userInfo().id
|
|
@@ -1886,26 +1897,31 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleOkImage() {
|
|
|
- var params = {}
|
|
|
- params.projectId = this.addImageData.projectId
|
|
|
- params.videoId = this.addImageData.code
|
|
|
- params.imageArr = this.imageArrList
|
|
|
- this.loadingImage = true
|
|
|
- postAction('/insertImage', params).then(res => {
|
|
|
- console.log(res)
|
|
|
- if (res.code == 0) {
|
|
|
- this.urlListImage = {
|
|
|
- url: [],
|
|
|
- md5: [],
|
|
|
- name: [],
|
|
|
- size: []
|
|
|
- }
|
|
|
- this.imageArrList = []
|
|
|
- this.addImageVisible = false
|
|
|
- this.loadingImage = false
|
|
|
- this.loadData()
|
|
|
+ if(this.urlListImage.url.length>0){
|
|
|
+ var params = {}
|
|
|
+ params.projectId = this.addImageData.projectId
|
|
|
+ params.videoId = this.addImageData.code
|
|
|
+ params.imageArr = this.imageArrList
|
|
|
+ this.loadingImage = true
|
|
|
+ postAction('/insertImage', params).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.urlListImage = {
|
|
|
+ url: [],
|
|
|
+ md5: [],
|
|
|
+ name: [],
|
|
|
+ size: []
|
|
|
+ }
|
|
|
+ this.imageArrList = []
|
|
|
+ this.addImageVisible = false
|
|
|
+ this.loadingImage = false
|
|
|
+ this.loadData()
|
|
|
+ }else{
|
|
|
+ this.loadingImage = false
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
+
|
|
|
},
|
|
|
handleOk() {
|
|
|
this.loading = true
|
|
@@ -2059,7 +2075,8 @@ export default {
|
|
|
this.queryParam = {
|
|
|
type: 'VIDEO',
|
|
|
userId: this.userInfo().id,
|
|
|
- status: key
|
|
|
+ status: key ,
|
|
|
+ projectId:this.queryParam.projectId
|
|
|
}
|
|
|
if (this.form.getFieldValue('projectId')) {
|
|
|
this.form.setFieldsValue({
|
|
@@ -2080,6 +2097,11 @@ export default {
|
|
|
this.repeat = false
|
|
|
this.$message.success('上传成功')
|
|
|
},
|
|
|
+ deleteImage(url){
|
|
|
+ console.log(url,this.urlListImage.url)
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
overUploadImage(urlAll) {
|
|
|
// var index = this.urlList.url.findIndex(item => item === urlAll[0])
|
|
|
// var data = { url: urlAll[0], code: this.urlList.md5[index], name: this.urlList.name[index] }
|
|
@@ -2088,97 +2110,85 @@ export default {
|
|
|
that.material = []
|
|
|
that.imageArrList = []
|
|
|
var img
|
|
|
-
|
|
|
- for (var i = 0; i < this.urlListImage.url.length; i++) {
|
|
|
- that.imageArrList.push({
|
|
|
- // width: img.width,
|
|
|
- // height: img.height,
|
|
|
- // size: this.urlListImage.size[i],
|
|
|
- code: this.urlListImage.md5[i],
|
|
|
- url: this.urlListImage.url[i],
|
|
|
- materialName: this.urlListImage.name[i]
|
|
|
- })
|
|
|
- img = new Image()
|
|
|
- img.src = this.urlListImage.url[i]
|
|
|
- if (img.complete) {
|
|
|
- // 打印
|
|
|
- if (img.width == 720) {
|
|
|
- if (img.height == 1280) {
|
|
|
- that.material.push(true)
|
|
|
- } else {
|
|
|
- that.material.push(false)
|
|
|
- }
|
|
|
- } else if (img.width == 1080) {
|
|
|
- if (img.height == 1920) {
|
|
|
- that.material.push(true)
|
|
|
- } else {
|
|
|
- that.material.push(false)
|
|
|
- }
|
|
|
- } else if (img.width == 1280) {
|
|
|
- if (img.height == 720) {
|
|
|
- that.material.push(true)
|
|
|
- } else {
|
|
|
- that.material.push(false)
|
|
|
- }
|
|
|
- } else if (img.width == 1920) {
|
|
|
- if (img.height == 1080) {
|
|
|
- that.material.push(true)
|
|
|
- } else {
|
|
|
- that.material.push(false)
|
|
|
- }
|
|
|
- } else {
|
|
|
- that.material.push(false)
|
|
|
- }
|
|
|
- // that.imageArrList.push({
|
|
|
- // width: img.width,
|
|
|
- // height: img.height,
|
|
|
- // size: this.urlListImage.size[i],
|
|
|
- // code: this.urlListImage.md5[i],
|
|
|
- // url: this.urlListImage.url[i],
|
|
|
- // materialName: this.urlListImage.name[i]
|
|
|
- // })
|
|
|
- } else {
|
|
|
-
|
|
|
- img.onload = () => {
|
|
|
- // that.imageArrList.push({
|
|
|
- // width: img.width,
|
|
|
- // height: img.height,
|
|
|
- // size: that.urlListImage.size[i-1],
|
|
|
- // code: that.urlListImage.md5[i-1],
|
|
|
- // url: that.urlListImage.url[i-1],
|
|
|
- // materialName: that.urlListImage.name[i-1]
|
|
|
- // })
|
|
|
+ if(urlAll.length>0){
|
|
|
+ for (var i = 0; i < this.urlListImage.url.length; i++) {
|
|
|
+ that.imageArrList.push({
|
|
|
+ // width: img.width,
|
|
|
+ // height: img.height,
|
|
|
+ // size: this.urlListImage.size[i],
|
|
|
+ code: this.urlListImage.md5[i],
|
|
|
+ url: this.urlListImage.url[i],
|
|
|
+ materialName: this.urlListImage.name[i]
|
|
|
+ })
|
|
|
+ img = new Image()
|
|
|
+ img.src = this.urlListImage.url[i]
|
|
|
+ if (img.complete) {
|
|
|
+ // 打印
|
|
|
if (img.width == 720) {
|
|
|
if (img.height == 1280) {
|
|
|
- that.material.push(true)
|
|
|
+ that.material.push(true)
|
|
|
} else {
|
|
|
- that.material.push(false)
|
|
|
+ that.material.push(false)
|
|
|
}
|
|
|
} else if (img.width == 1080) {
|
|
|
if (img.height == 1920) {
|
|
|
- that.material.push(true)
|
|
|
+ that.material.push(true)
|
|
|
} else {
|
|
|
- that.material.push(false)
|
|
|
+ that.material.push(false)
|
|
|
}
|
|
|
} else if (img.width == 1280) {
|
|
|
if (img.height == 720) {
|
|
|
- that.material.push(true)
|
|
|
+ that.material.push(true)
|
|
|
} else {
|
|
|
- that.material.push(false)
|
|
|
+ that.material.push(false)
|
|
|
}
|
|
|
} else if (img.width == 1920) {
|
|
|
if (img.height == 1080) {
|
|
|
- that.material.push(true)
|
|
|
+ that.material.push(true)
|
|
|
} else {
|
|
|
- that.material.push(false)
|
|
|
+ that.material.push(false)
|
|
|
}
|
|
|
} else {
|
|
|
that.material.push(false)
|
|
|
}
|
|
|
-
|
|
|
- }
|
|
|
+ } else {
|
|
|
+
|
|
|
+ img.onload = () => {
|
|
|
+ if (img.width == 720) {
|
|
|
+ if (img.height == 1280) {
|
|
|
+ that.material.push(true)
|
|
|
+ } else {
|
|
|
+ that.material.push(false)
|
|
|
+ }
|
|
|
+ } else if (img.width == 1080) {
|
|
|
+ if (img.height == 1920) {
|
|
|
+ that.material.push(true)
|
|
|
+ } else {
|
|
|
+ that.material.push(false)
|
|
|
+ }
|
|
|
+ } else if (img.width == 1280) {
|
|
|
+ if (img.height == 720) {
|
|
|
+ that.material.push(true)
|
|
|
+ } else {
|
|
|
+ that.material.push(false)
|
|
|
+ }
|
|
|
+ } else if (img.width == 1920) {
|
|
|
+ if (img.height == 1080) {
|
|
|
+ that.material.push(true)
|
|
|
+ } else {
|
|
|
+ that.material.push(false)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ that.material.push(false)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ }else{
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
file(file) {
|
|
|
var bmf = new BMF()
|