|
@@ -266,10 +266,13 @@
|
|
|
</a-button>
|
|
|
</template>
|
|
|
<a-form-item label="" class="add-image-material">
|
|
|
+ <uploadFile v-if="addImageVisible" :value.sync="urlListImage.url" :checkFile="fileWater"
|
|
|
+ @overUpload="overUploadImage" @removeUpload="deleteImage" :fileCount="15" uploadType="image" />
|
|
|
+ <!--
|
|
|
<upload-to-ali style="width:100%" v-model="urlListImage.url" :customDomain="customDomain" :multiple="true"
|
|
|
preview :region="region" :bucket="bucket" :accept="acceptImage" :max="15" :size="2048"
|
|
|
:accessKeyId="accessKeyId" :accessKeySecret="accessKeySecret" :before-upload="fileWater" :dir="dirImg"
|
|
|
- @delete='deleteImage' @loaded="overUploadImage"></upload-to-ali>
|
|
|
+ @delete='deleteImage' @loaded="overUploadImage"></upload-to-ali> -->
|
|
|
<span v-if="material.filter(item => item == false).length > 0 && urlListImage.url.length > 0"
|
|
|
style="color:red">上传素材的尺寸不符,请修改(<span v-for="(item, index) of material" :key="index"
|
|
|
v-show="!item">第{{ index + 1 }}张</span>出错)</span>
|
|
@@ -286,10 +289,13 @@
|
|
|
</a-button>
|
|
|
</template>
|
|
|
<a-form-item label="" class="add-image-material">
|
|
|
- <upload-to-ali v-model="urlList.url" :customDomain="customDomain" preview :region="region" :bucket="bucket"
|
|
|
+ <uploadFile v-if="addVideoVisible" :checkFile="file" :value.sync="urlList.url" @overUpload="overUpload" :fileCount="10"
|
|
|
+ uploadType="video" :multiple="false" />
|
|
|
+
|
|
|
+ <!-- <upload-to-ali v-model="urlList.url" :customDomain="customDomain" preview :region="region" :bucket="bucket"
|
|
|
:accept="acceptVideo" :max="10" :size="1024000" :accessKeyId="accessKeyId" :accessKeySecret="accessKeySecret"
|
|
|
:before-upload="file" :dir="dirVideo" @loaded="overUpload">
|
|
|
- </upload-to-ali>
|
|
|
+ </upload-to-ali> -->
|
|
|
<span v-if="messageTip" style="color:red">{{messageTip}}</span>
|
|
|
</a-form-item>
|
|
|
</a-modal>
|
|
@@ -418,7 +424,7 @@
|
|
|
} from '@/utils/videoControl' // 停止除当前外的其他视频播放,及停止所有视频播放的方法
|
|
|
import checkMatemal from './stepModule/checkMatemal'
|
|
|
import BMF from 'browser-md5-file'
|
|
|
-
|
|
|
+ import uploadFile from '@/components/uploadFile.vue'
|
|
|
|
|
|
let nowIndex = 0
|
|
|
let bestIndex = 0
|
|
@@ -428,7 +434,8 @@
|
|
|
components: {
|
|
|
UploadToAli,
|
|
|
VuePreview,
|
|
|
- checkMatemal
|
|
|
+ checkMatemal,
|
|
|
+ uploadFile
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -1068,76 +1075,76 @@
|
|
|
that.imageArrList = []
|
|
|
var img
|
|
|
if (urlAll.length > 0) {
|
|
|
- for (var i = 0; i < this.urlListImage.url.length; i++) {
|
|
|
+ for (var i = 0; i < urlAll.length; i++) {
|
|
|
that.imageArrList.push({
|
|
|
signature: this.urlListImage.md5[i],
|
|
|
- url: this.urlListImage.url[i],
|
|
|
+ url: urlAll[i].url,
|
|
|
})
|
|
|
|
|
|
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)
|
|
|
- }
|
|
|
- } 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)
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
+ img.src = urlAll[i].url
|
|
|
+ // 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)
|
|
|
+ // }
|
|
|
+ // } 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)
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1150,14 +1157,10 @@
|
|
|
// md5: []
|
|
|
// }
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
- for (let i = 0; i < file.length; i++) {
|
|
|
- bmf.md5(file[i], (err, md5) => {
|
|
|
- // that.urlListImage.name.push(file[i].name)
|
|
|
- that.urlListImage.md5.push(md5)
|
|
|
- resolve()
|
|
|
-
|
|
|
- })
|
|
|
- }
|
|
|
+ bmf.md5(file, (err, md5) => {
|
|
|
+ that.urlListImage.md5.push(md5)
|
|
|
+ resolve()
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
overUpload(urlAll) {
|
|
@@ -1167,7 +1170,7 @@
|
|
|
var bmf = new BMF()
|
|
|
var that = this
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
- bmf.md5(file[0], (err, md5) => {
|
|
|
+ bmf.md5(file, (err, md5) => {
|
|
|
|
|
|
|
|
|
getAction('/kusiShouUpload/checkVideo', {
|