|
@@ -587,7 +587,7 @@ a {
|
|
<a-modal title="封面上传" @cancel="closeImage" @afterClose="closeImage" v-model="addImageVisible">
|
|
<a-modal title="封面上传" @cancel="closeImage" @afterClose="closeImage" v-model="addImageVisible">
|
|
<template slot="footer">
|
|
<template slot="footer">
|
|
<a-button key="back" @click="closeImage">取消</a-button>
|
|
<a-button key="back" @click="closeImage">取消</a-button>
|
|
- <a-button key="submit" type="primary" @click="handleOkImage">
|
|
|
|
|
|
+ <a-button key="submit" type="primary" @click="handleOkImage" :loading="loadingImage">
|
|
确定
|
|
确定
|
|
</a-button>
|
|
</a-button>
|
|
</template>
|
|
</template>
|
|
@@ -705,7 +705,7 @@ a {
|
|
:wrapper-col="wrapperCol"
|
|
:wrapper-col="wrapperCol"
|
|
label="封面上传"
|
|
label="封面上传"
|
|
class="add-image-material"
|
|
class="add-image-material"
|
|
- v-if="getData('projectId')&&add"
|
|
|
|
|
|
+ v-if="getData('projectId')&&add&&urlList.url!=''"
|
|
>
|
|
>
|
|
<upload-to-ali
|
|
<upload-to-ali
|
|
style="width:160%"
|
|
style="width:160%"
|
|
@@ -1107,7 +1107,7 @@ a {
|
|
<a-modal title="人员修改" v-model="personVisible" @afterClose="closePerson">
|
|
<a-modal title="人员修改" v-model="personVisible" @afterClose="closePerson">
|
|
<template slot="footer">
|
|
<template slot="footer">
|
|
<a-button key="back" @click="closePerson">取消</a-button>
|
|
<a-button key="back" @click="closePerson">取消</a-button>
|
|
- <a-button key="submit" type="primary" @click="handleOkPerson">
|
|
|
|
|
|
+ <a-button key="submit" type="primary" :loading="loadingPerson" @click="handleOkPerson">
|
|
确定
|
|
确定
|
|
</a-button>
|
|
</a-button>
|
|
</template>
|
|
</template>
|
|
@@ -1247,6 +1247,8 @@ export default {
|
|
personVisible:false,
|
|
personVisible:false,
|
|
confirmLoading: false,
|
|
confirmLoading: false,
|
|
loading:false,
|
|
loading:false,
|
|
|
|
+ loadingImage:false,
|
|
|
|
+ loadingPerson:false,
|
|
activeKey: 'video',
|
|
activeKey: 'video',
|
|
active: '0',
|
|
active: '0',
|
|
examinelList: [
|
|
examinelList: [
|
|
@@ -1857,6 +1859,7 @@ export default {
|
|
this.personVisible = false
|
|
this.personVisible = false
|
|
},
|
|
},
|
|
handleOkPerson(){
|
|
handleOkPerson(){
|
|
|
|
+ this.loadingPerson = true
|
|
this.formPerson.validateFieldsAndScroll((err, values) => {
|
|
this.formPerson.validateFieldsAndScroll((err, values) => {
|
|
if (err) {
|
|
if (err) {
|
|
// 这里做逻辑处理
|
|
// 这里做逻辑处理
|
|
@@ -1871,6 +1874,7 @@ export default {
|
|
console.log(res)
|
|
console.log(res)
|
|
if(res.success){
|
|
if(res.success){
|
|
this.$message.success('修改成功')
|
|
this.$message.success('修改成功')
|
|
|
|
+ this.loadingPerson = false
|
|
this.closePerson()
|
|
this.closePerson()
|
|
this.loadData()
|
|
this.loadData()
|
|
}else{
|
|
}else{
|
|
@@ -1886,6 +1890,7 @@ export default {
|
|
params.projectId = this.addImageData.projectId
|
|
params.projectId = this.addImageData.projectId
|
|
params.videoId = this.addImageData.code
|
|
params.videoId = this.addImageData.code
|
|
params.imageArr = this.imageArrList
|
|
params.imageArr = this.imageArrList
|
|
|
|
+ this.loadingImage = true
|
|
postAction('/insertImage', params).then(res => {
|
|
postAction('/insertImage', params).then(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
@@ -1897,6 +1902,7 @@ export default {
|
|
}
|
|
}
|
|
this.imageArrList = []
|
|
this.imageArrList = []
|
|
this.addImageVisible = false
|
|
this.addImageVisible = false
|
|
|
|
+ this.loadingImage = false
|
|
this.loadData()
|
|
this.loadData()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -2082,8 +2088,17 @@ export default {
|
|
that.material = []
|
|
that.material = []
|
|
that.imageArrList = []
|
|
that.imageArrList = []
|
|
var img
|
|
var img
|
|
- img = new Image()
|
|
|
|
|
|
+
|
|
for (var i = 0; i < this.urlListImage.url.length; i++) {
|
|
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]
|
|
img.src = this.urlListImage.url[i]
|
|
if (img.complete) {
|
|
if (img.complete) {
|
|
// 打印
|
|
// 打印
|
|
@@ -2114,18 +2129,25 @@ export default {
|
|
} else {
|
|
} else {
|
|
that.material.push(false)
|
|
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]
|
|
|
|
- })
|
|
|
|
- alert(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]
|
|
|
|
+ // })
|
|
} else {
|
|
} else {
|
|
|
|
|
|
img.onload = () => {
|
|
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 (img.width == 720) {
|
|
if (img.width == 720) {
|
|
if (img.height == 1280) {
|
|
if (img.height == 1280) {
|
|
that.material.push(true)
|
|
that.material.push(true)
|
|
@@ -2153,18 +2175,10 @@ export default {
|
|
} else {
|
|
} else {
|
|
that.material.push(false)
|
|
that.material.push(false)
|
|
}
|
|
}
|
|
- 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]
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- console.log(this.imageArrList)
|
|
|
|
},
|
|
},
|
|
file(file) {
|
|
file(file) {
|
|
var bmf = new BMF()
|
|
var bmf = new BMF()
|
|
@@ -2193,13 +2207,21 @@ export default {
|
|
fileWater(file) {
|
|
fileWater(file) {
|
|
var bmf = new BMF()
|
|
var bmf = new BMF()
|
|
var that = this
|
|
var that = this
|
|
|
|
+ var codeData = that.urlList.md5!=''?that.urlList.md5:that.addImageData.code
|
|
|
|
+ console.log(codeData)
|
|
|
|
+ this.urlListImage= {
|
|
|
|
+ url: [],
|
|
|
|
+ md5: [],
|
|
|
|
+ name: [],
|
|
|
|
+ size: []
|
|
|
|
+ }
|
|
return new Promise(function(resolve, reject) {
|
|
return new Promise(function(resolve, reject) {
|
|
for (let i = 0; i < file.length; i++) {
|
|
for (let i = 0; i < file.length; i++) {
|
|
bmf.md5(file[i], (err, md5) => {
|
|
bmf.md5(file[i], (err, md5) => {
|
|
fileCheckImage({
|
|
fileCheckImage({
|
|
code: md5,
|
|
code: md5,
|
|
projectId: that.getData('projectId'),
|
|
projectId: that.getData('projectId'),
|
|
- videoId:that.addImageData.code
|
|
|
|
|
|
+ videoId:codeData
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
that.$message.error('此素材已经上传')
|
|
that.$message.error('此素材已经上传')
|