|
@@ -525,7 +525,7 @@
|
|
|
|
|
|
|
|
|
|
<span class="wancheng" v-if="text==7"> </span>
|
|
<span class="wancheng" v-if="text==7"> </span>
|
|
- <span class="bohui" v-else-if="text==3"> </span>
|
|
|
|
|
|
+ <span class="bohui" v-else-if="text==3 || text==6"> </span>
|
|
<span class="shenhe" v-else> </span>
|
|
<span class="shenhe" v-else> </span>
|
|
{{text | handlerMaterialStatus}}
|
|
{{text | handlerMaterialStatus}}
|
|
</div>
|
|
</div>
|
|
@@ -564,7 +564,7 @@
|
|
@close="onClose"
|
|
@close="onClose"
|
|
>
|
|
>
|
|
|
|
|
|
- <a-spin :spinning="visibleLoading">
|
|
|
|
|
|
+ <a-spin :spinning="visibleLoading">
|
|
<a-drawer
|
|
<a-drawer
|
|
:title="add ? '上传视频' : '修改视频'"
|
|
:title="add ? '上传视频' : '修改视频'"
|
|
width="600"
|
|
width="600"
|
|
@@ -572,25 +572,26 @@
|
|
:visible="childrenDrawer"
|
|
:visible="childrenDrawer"
|
|
@close="onChildrenDrawerClose"
|
|
@close="onChildrenDrawerClose"
|
|
>
|
|
>
|
|
|
|
+ <a-spin :spinning="videoUploadLoading">
|
|
<a-form :form="form" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
<a-form :form="form" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
<a-form-item label="视频上传">
|
|
<a-form-item label="视频上传">
|
|
- <!-- :checkFile="file" -->
|
|
|
|
|
|
+ <!-- -->
|
|
<uploadFile
|
|
<uploadFile
|
|
-
|
|
|
|
|
|
+ :checkFile="file"
|
|
:value.sync="urlList.url"
|
|
:value.sync="urlList.url"
|
|
@overUpload="overUpload"
|
|
@overUpload="overUpload"
|
|
@removeUpload="removeUpload"
|
|
@removeUpload="removeUpload"
|
|
- :fileCount="10"
|
|
|
|
|
|
+ :fileCount="1"
|
|
uploadType="video"
|
|
uploadType="video"
|
|
:multiple="false"
|
|
:multiple="false"
|
|
/>
|
|
/>
|
|
<span v-if="repeat" style="color: red">此素材重复,请重新选择上传</span>
|
|
<span v-if="repeat" style="color: red">此素材重复,请重新选择上传</span>
|
|
- <span v-if="confirmLoading && urlList.url != ''" style="color: green">上传成功</span>
|
|
|
|
|
|
+ <span v-if="confirmLoading && videoinfo.url != ''" style="color: green">上传成功</span>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
label="封面上传"
|
|
label="封面上传"
|
|
class="add-image-material"
|
|
class="add-image-material"
|
|
- v-if="currentMaterial.projectId && add && urlList.url != ''"
|
|
|
|
|
|
+ v-if="currentMaterial.projectId && add && videoinfo.url != ''"
|
|
>
|
|
>
|
|
<uploadFile
|
|
<uploadFile
|
|
:value.sync="urlListImage.url"
|
|
:value.sync="urlListImage.url"
|
|
@@ -732,12 +733,13 @@
|
|
<a-textarea
|
|
<a-textarea
|
|
placeholder="请输入描述"
|
|
placeholder="请输入描述"
|
|
v-decorator="[
|
|
v-decorator="[
|
|
- 'materialDescribe', // 给表单赋值或拉取表单时,该input对应的key
|
|
|
|
|
|
+ 'describe', // 给表单赋值或拉取表单时,该input对应的key
|
|
]"
|
|
]"
|
|
:auto-size="{ minRows: 3, maxRows: 10 }"
|
|
:auto-size="{ minRows: 3, maxRows: 10 }"
|
|
/>
|
|
/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-form>
|
|
</a-form>
|
|
|
|
+ </a-spin>
|
|
<div
|
|
<div
|
|
:style="{
|
|
:style="{
|
|
position: 'absolute',
|
|
position: 'absolute',
|
|
@@ -814,11 +816,12 @@
|
|
</div>
|
|
</div>
|
|
<div class="bottom-btn">
|
|
<div class="bottom-btn">
|
|
<a-button type='primary' @click="approved" v-if="role=='operator'&¤tMaterial.materialStatus==5" style="margin-right:20px">通过审核</a-button>
|
|
<a-button type='primary' @click="approved" v-if="role=='operator'&¤tMaterial.materialStatus==5" style="margin-right:20px">通过审核</a-button>
|
|
- <a-button type='default' @click="()=>{videoRejectVisiable=true}" v-if="role=='operator'&¤tMaterial.materialStatus==5" style="margin-right:20px">驳回</a-button>
|
|
|
|
|
|
+ <a-button type='default' @click="()=>{videoRejectVisiable=true}" v-if="role=='operator'&¤tMaterial.materialStatus==5" style="margin-right:20px">驳回</a-button>
|
|
|
|
+ <a-button type='primary' v-if="role!='operator'&¤tVideo.videoStatus==2" :disabled="currentVideo.clip!=userInfo.id" @click="modifyVideo" style="margin-right:20px">修改视频信息</a-button>
|
|
<a-button type='default' @click="onClose">关闭</a-button>
|
|
<a-button type='default' @click="onClose">关闭</a-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </a-spin>
|
|
|
|
|
|
+ </a-spin>
|
|
</a-drawer>
|
|
</a-drawer>
|
|
|
|
|
|
|
|
|
|
@@ -967,15 +970,6 @@
|
|
<a-button key="back" @click="()=>{videoRejectVisiable=false}">取消</a-button>
|
|
<a-button key="back" @click="()=>{videoRejectVisiable=false}">取消</a-button>
|
|
<a-button type="primary" @click="reject" :loading="loadingElse">确定驳回</a-button>
|
|
<a-button type="primary" @click="reject" :loading="loadingElse">确定驳回</a-button>
|
|
</template>
|
|
</template>
|
|
- <!-- <div>
|
|
|
|
- <span>驳回类型:</span>
|
|
|
|
- <a-radio-group v-model="videoRejectType" >
|
|
|
|
- <a-radio-button value="video">视频不合格</a-radio-button>
|
|
|
|
- <a-radio-button value="image">封面不合格</a-radio-button>
|
|
|
|
- <a-radio-button value="tag">标签不合格</a-radio-button>
|
|
|
|
-
|
|
|
|
- </a-radio-group>
|
|
|
|
- </div> -->
|
|
|
|
|
|
|
|
<a-textarea
|
|
<a-textarea
|
|
v-model="videoAdvise"
|
|
v-model="videoAdvise"
|
|
@@ -1136,6 +1130,8 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ videoEchoInfo:{},
|
|
|
|
+ videoUploadLoading:false,
|
|
videoRejectType:'1',
|
|
videoRejectType:'1',
|
|
assignVisibleLoading:false,
|
|
assignVisibleLoading:false,
|
|
visibleLoading:false,
|
|
visibleLoading:false,
|
|
@@ -1163,7 +1159,7 @@ export default {
|
|
loadDisabled:false,
|
|
loadDisabled:false,
|
|
labelCol: { span: 4 },
|
|
labelCol: { span: 4 },
|
|
wrapperCol: { span: 14 },
|
|
wrapperCol: { span: 14 },
|
|
- loadingElse: false,
|
|
|
|
|
|
+
|
|
formPerson:{
|
|
formPerson:{
|
|
plan:'',
|
|
plan:'',
|
|
shot:'',
|
|
shot:'',
|
|
@@ -1292,9 +1288,59 @@ export default {
|
|
add: true,
|
|
add: true,
|
|
inputVisible: false,
|
|
inputVisible: false,
|
|
inputValue: '',
|
|
inputValue: '',
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ videoinfo:{
|
|
|
|
+ url: '',
|
|
|
|
+ md5: '',
|
|
|
|
+ name: '',
|
|
|
|
+ width:undefined,
|
|
|
|
+ height:undefined,
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ imageinfo:[],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ modifyVideo(){
|
|
|
|
+ this.childrenDrawer=true;
|
|
|
|
+ // console.log(this.currentVideo);
|
|
|
|
+
|
|
|
|
+ this.videoUploadLoading=true
|
|
|
|
+ getAction('/platform/material/videoEcho',{
|
|
|
|
+ videoId:this.currentVideo.videoId
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ console.log(res)
|
|
|
|
+
|
|
|
|
+ this.videoUploadLoading=false;
|
|
|
|
+ this.confirmLoading=true;
|
|
|
|
+ if(res.result.video){
|
|
|
|
+ this.urlList=res.result.video
|
|
|
|
+ this.videoinfo=res.result.video;
|
|
|
|
+ this.videoinfo.url=this.videoinfo.url.replace(/https:/g,'')
|
|
|
|
+ }
|
|
|
|
+ if(res.result.covers){
|
|
|
|
+ this.imageinfo=res.result.covers;
|
|
|
|
+ this.urlListImage= {
|
|
|
|
+ url : res.result.covers.map(item=>{return item.url}),
|
|
|
|
+ md5 : res.result.covers.map(item=>item.md5),
|
|
|
|
+ name : res.result.covers.map(item=>item.name),
|
|
|
|
+ size : res.result.covers.map(item=>item.size),
|
|
|
|
+ format : res.result.covers.map(item=>item.format),
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.form.setFieldsValue({
|
|
|
|
+ contentTagList: res.result.tags.contentTagList.map(item=>{return item.tagId}),
|
|
|
|
+ modalityTagList: res.result.tags.modalityTagList.map(item=>{return item.tagId}),
|
|
|
|
+ modTagList: res.result.tags.modTagList.map(item=>{return item.tagId}),
|
|
|
|
+ senceTagList: res.result.tags.senceTagList.map(item=>{return item.tagId}),
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ this.videoEchoInfo=res.result
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
editOrder(){
|
|
editOrder(){
|
|
this.$parent.isEdit=true;
|
|
this.$parent.isEdit=true;
|
|
this.$parent.orderId=this.currentOrderInfo.id;
|
|
this.$parent.orderId=this.currentOrderInfo.id;
|
|
@@ -1605,23 +1651,31 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 视频驳回
|
|
// 视频驳回
|
|
- reject(){
|
|
|
|
- postAction(this.url.videoReject,{
|
|
|
|
- id:this.currentMaterial.id,
|
|
|
|
- videoAdvise:this.videoAdvise,
|
|
|
|
- materialCode:this.currentMaterial.materialCode
|
|
|
|
-
|
|
|
|
- }).then(res=>{
|
|
|
|
- console.log(res);
|
|
|
|
- this.videoAdvise=''
|
|
|
|
- this.visible=false;
|
|
|
|
- if(res.success){
|
|
|
|
- this.$message.success(res.message);
|
|
|
|
- this.materialHttp()
|
|
|
|
- }else{
|
|
|
|
- this.$message.error(res.message)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ reject(){
|
|
|
|
+ this.loadingElse=true;
|
|
|
|
+ if(this.videoAdvise){
|
|
|
|
+ postAction(this.url.videoReject,{
|
|
|
|
+ id:this.currentMaterial.id,
|
|
|
|
+ videoAdvise:this.videoAdvise,
|
|
|
|
+ materialCode:this.currentMaterial.materialCode
|
|
|
|
+
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.videoAdvise=''
|
|
|
|
+ this.visible=false;
|
|
|
|
+ this.videoRejectVisiable=false;
|
|
|
|
+ if(res.success){
|
|
|
|
+ this.$message.success(res.message);
|
|
|
|
+ this.materialHttp()
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.message)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ this.loadingElse=false;
|
|
|
|
+ this.$message.error('请填写驳回理由')
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
},
|
|
},
|
|
// 脚本通过审核
|
|
// 脚本通过审核
|
|
@@ -1644,22 +1698,31 @@ export default {
|
|
},
|
|
},
|
|
// 脚本驳回
|
|
// 脚本驳回
|
|
scriptReject(){
|
|
scriptReject(){
|
|
- postAction(this.url.scriptReject,{
|
|
|
|
- id:this.currentMaterial.id,
|
|
|
|
- scriptAdvise:this.scriptAdvise,
|
|
|
|
- materialCode:this.currentMaterial.materialCode
|
|
|
|
- }).then(res=>{
|
|
|
|
- console.log(res);
|
|
|
|
|
|
+ this.loadingElse=true;
|
|
|
|
+ if(this.scriptAdvise){
|
|
|
|
+ postAction(this.url.scriptReject,{
|
|
|
|
+ id:this.currentMaterial.id,
|
|
|
|
+ scriptAdvise:this.scriptAdvise,
|
|
|
|
+ materialCode:this.currentMaterial.materialCode
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ console.log(res);
|
|
|
|
|
|
- this.scriptVisible=false;
|
|
|
|
- this.scriptReject=''
|
|
|
|
- if(res.success){
|
|
|
|
- this.$message.success(res.message);
|
|
|
|
- this.materialHttp()
|
|
|
|
- }else{
|
|
|
|
- this.$message.error(res.message)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ this.scriptVisible=false;
|
|
|
|
+ this.scriptAdvise=''
|
|
|
|
+ this.scriptRejectVisiable=false;
|
|
|
|
+ this.loadingElse=false;
|
|
|
|
+ if(res.success){
|
|
|
|
+ this.$message.success(res.message);
|
|
|
|
+ this.materialHttp()
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.message)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ this.loadingElse=false;
|
|
|
|
+ this.$messgae.error('请填写驳回理由')
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
// 生成水印
|
|
// 生成水印
|
|
getWater() {
|
|
getWater() {
|
|
@@ -1740,7 +1803,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
beforeUpload(file) {
|
|
beforeUpload(file) {
|
|
- this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
|
|
|
|
|
|
+ // this.uploadAction= `http://api.tjyourong.com.cn/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
|
|
|
|
+ this.uploadAction= `http://139.186.151.174:8804/jeecg-boot/platform/file/uploadScript?materialId=${this.currentMaterial.id}&projectId=${this.currentMaterial.projectId}`
|
|
|
|
+
|
|
this.loadDisabled = true
|
|
this.loadDisabled = true
|
|
const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
|
|
const size = (Number(file.size) / (1024 * 1024)).toFixed(2)
|
|
const fileName = file.name
|
|
const fileName = file.name
|
|
@@ -1801,7 +1866,21 @@ export default {
|
|
name: [],
|
|
name: [],
|
|
size: [],
|
|
size: [],
|
|
}
|
|
}
|
|
- this.imageArrList = []
|
|
|
|
|
|
+ this.imageArrList = [];
|
|
|
|
+ this.videoinfo={
|
|
|
|
+ url: '',
|
|
|
|
+ md5: '',
|
|
|
|
+ name: '',
|
|
|
|
+ width:undefined,
|
|
|
|
+ height:undefined,
|
|
|
|
+ };
|
|
|
|
+ this.imageinfo=[];
|
|
|
|
+ this.form.setFieldsValue({
|
|
|
|
+ contentTagList: null,
|
|
|
|
+ modalityTagList: null,
|
|
|
|
+ modTagList: null,
|
|
|
|
+ senceTagList: null,
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
onChildrenDrawerOk(){
|
|
onChildrenDrawerOk(){
|
|
@@ -1811,71 +1890,101 @@ export default {
|
|
this.loadingElse = true
|
|
this.loadingElse = true
|
|
var params = {
|
|
var params = {
|
|
...values,
|
|
...values,
|
|
|
|
+ ...this.videoinfo,
|
|
|
|
+ covers:[...this.imageinfo]
|
|
}
|
|
}
|
|
- // var roleCode = {}
|
|
|
|
- // for (const key in this.role) {
|
|
|
|
- // if (key == 'roleCode') {
|
|
|
|
- // this.role[key] = this.role[key] + 'Id'
|
|
|
|
- // roleCode[this.role[key]] = this.userInfo.id
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
|
|
+
|
|
params.id = this.add ? null : this.id
|
|
params.id = this.add ? null : this.id
|
|
- params.code = this.urlList.md5
|
|
|
|
- params.url = this.urlList.url
|
|
|
|
- params.materialName = this.urlList.name
|
|
|
|
-
|
|
|
|
params.userId = this.userInfo.id
|
|
params.userId = this.userInfo.id
|
|
- params.projectId = values.projectId
|
|
|
|
- params.materialDescribe = values.materialDescribe
|
|
|
|
- params.type = 'VIDEO'
|
|
|
|
- // params.tagList = values.tagList
|
|
|
|
- params.ascription ={
|
|
|
|
- planId: this.currentMaterial.plan,
|
|
|
|
- shotId: this.currentMaterial.shot,
|
|
|
|
- clipId: this.currentMaterial.clip,
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
params.projectId=this.currentMaterial.projectId
|
|
params.projectId=this.currentMaterial.projectId
|
|
- params.materialId=this.currentMaterial.id||this.currentMaterial.materialId
|
|
|
|
- params.tag = this.tags
|
|
|
|
- params.imageArr = this.imageArrList
|
|
|
|
|
|
+ params.materialId=this.currentMaterial.id ||this.currentMaterial.materialId
|
|
|
|
+ params.materialCode=this.currentMaterial.materialCode
|
|
if (this.add) {
|
|
if (this.add) {
|
|
- orderFileInsert(params).then((res) => {
|
|
|
|
- if (res.success) {
|
|
|
|
- this.form.resetFields()
|
|
|
|
- this.urlList = {
|
|
|
|
- url: '',
|
|
|
|
- md5: '',
|
|
|
|
- name: '',
|
|
|
|
|
|
+ postAction('/platform/file/uploadVideo',params).then(res=>{
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.form.resetFields()
|
|
|
|
+ this.urlList = {
|
|
|
|
+ url: '',
|
|
|
|
+ md5: '',
|
|
|
|
+ name: '',
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.urlListImage = {
|
|
|
|
+ url: [],
|
|
|
|
+ md5: [],
|
|
|
|
+ name: [],
|
|
|
|
+ size: [],
|
|
|
|
+ }
|
|
|
|
+ this.imageArrList = []
|
|
|
|
+ this.tags = []
|
|
|
|
+
|
|
|
|
+ this.childrenDrawer = false
|
|
|
|
+ this.visible=false;
|
|
|
|
+ this.add = true
|
|
|
|
+ for (const key in this.role) {
|
|
|
|
+ if (key == 'roleCode') {
|
|
|
|
+ this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.$message.success('素材上传成功')
|
|
|
|
+ this.loadingElse = false
|
|
|
|
+ this.videoinfo={
|
|
|
|
+ url: '',
|
|
|
|
+ md5: '',
|
|
|
|
+ name: '',
|
|
|
|
+ width:undefined,
|
|
|
|
+ height:undefined,
|
|
|
|
+ };
|
|
|
|
+ this.imageinfo=[];
|
|
|
|
+ this.materialHttp()
|
|
|
|
+ // this.departValue = []
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error(res.message)
|
|
|
|
+ this.loadingElse = false
|
|
|
|
+ // this.childrenDrawer = false
|
|
|
|
+ // this.visible=false;
|
|
}
|
|
}
|
|
|
|
+ })
|
|
|
|
+ // orderFileInsert(params).then((res) => {
|
|
|
|
+ // if (res.success) {
|
|
|
|
+ // this.form.resetFields()
|
|
|
|
+ // this.urlList = {
|
|
|
|
+ // url: '',
|
|
|
|
+ // md5: '',
|
|
|
|
+ // name: '',
|
|
|
|
+ // }
|
|
|
|
|
|
- this.urlListImage = {
|
|
|
|
- url: [],
|
|
|
|
- md5: [],
|
|
|
|
- name: [],
|
|
|
|
- size: [],
|
|
|
|
- }
|
|
|
|
- this.imageArrList = []
|
|
|
|
- this.tags = []
|
|
|
|
|
|
+ // this.urlListImage = {
|
|
|
|
+ // url: [],
|
|
|
|
+ // md5: [],
|
|
|
|
+ // name: [],
|
|
|
|
+ // size: [],
|
|
|
|
+ // }
|
|
|
|
+ // this.imageArrList = []
|
|
|
|
+ // this.tags = []
|
|
|
|
|
|
- this.childrenDrawer = false
|
|
|
|
- this.visible=false;
|
|
|
|
- this.add = true
|
|
|
|
- for (const key in this.role) {
|
|
|
|
- if (key == 'roleCode') {
|
|
|
|
- this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- this.$message.success('素材上传成功')
|
|
|
|
- this.loadingElse = false
|
|
|
|
- this.materialHttp()
|
|
|
|
- // this.departValue = []
|
|
|
|
- } else {
|
|
|
|
- this.$message.error(res.message)
|
|
|
|
- this.loadingElse = false
|
|
|
|
- this.childrenDrawer = false
|
|
|
|
- this.visible=false;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ // this.childrenDrawer = false
|
|
|
|
+ // this.visible=false;
|
|
|
|
+ // this.add = true
|
|
|
|
+ // for (const key in this.role) {
|
|
|
|
+ // if (key == 'roleCode') {
|
|
|
|
+ // this.role[key] = this.role[key].substr(0, this.role[key].length - 2)
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // this.$message.success('素材上传成功')
|
|
|
|
+ // this.loadingElse = false
|
|
|
|
+ // this.videoinfo={};
|
|
|
|
+ // this.imageinfo=[];
|
|
|
|
+ // this.materialHttp()
|
|
|
|
+ // // this.departValue = []
|
|
|
|
+ // } else {
|
|
|
|
+ // this.$message.error(res.message)
|
|
|
|
+ // this.loadingElse = false
|
|
|
|
+ // this.childrenDrawer = false
|
|
|
|
+ // this.visible=false;
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
} else {
|
|
} else {
|
|
fileEdit({
|
|
fileEdit({
|
|
...params,
|
|
...params,
|
|
@@ -1915,14 +2024,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
// 上传视频相关方法
|
|
// 上传视频相关方法
|
|
removeUpload() {
|
|
removeUpload() {
|
|
this.form.setFieldsValue({
|
|
this.form.setFieldsValue({
|
|
@@ -1937,10 +2038,12 @@ export default {
|
|
this.confirmLoading = true
|
|
this.confirmLoading = true
|
|
this.repeat = false
|
|
this.repeat = false
|
|
this.urlList.url = urlAll[0].url
|
|
this.urlList.url = urlAll[0].url
|
|
|
|
+
|
|
|
|
+ this.videoinfo.url=urlAll[0].url
|
|
this.$message.success('上传成功')
|
|
this.$message.success('上传成功')
|
|
|
|
|
|
getAction('/ctop/materialTagInfo/detail', {
|
|
getAction('/ctop/materialTagInfo/detail', {
|
|
- code: this.urlList.md5,
|
|
|
|
|
|
+ code: this.videoinfo.md5,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
if (res.modalityTagList.length > 0) {
|
|
if (res.modalityTagList.length > 0) {
|
|
@@ -1969,25 +2072,23 @@ export default {
|
|
console.log(index)
|
|
console.log(index)
|
|
},
|
|
},
|
|
overUploadImage(urlAll) {
|
|
overUploadImage(urlAll) {
|
|
-
|
|
|
|
|
|
+ console.log(urlAll)
|
|
var that = this
|
|
var that = this
|
|
that.material = []
|
|
that.material = []
|
|
that.imageArrList = []
|
|
that.imageArrList = []
|
|
var img
|
|
var img
|
|
if (urlAll.length > 0) {
|
|
if (urlAll.length > 0) {
|
|
- for (var i = 0; i < urlAll.length; i++) {
|
|
|
|
- that.imageArrList.push({
|
|
|
|
- // width: img.width,
|
|
|
|
- // height: img.height,
|
|
|
|
- // size: this.urlListImage.size[i],
|
|
|
|
- code: this.urlListImage.md5[i],
|
|
|
|
- url: urlAll[i].url,
|
|
|
|
- materialName: this.urlListImage.name[i],
|
|
|
|
|
|
+ urlAll.forEach((ele,index)=>{
|
|
|
|
+
|
|
|
|
+ this.imageinfo.forEach(item=>{
|
|
|
|
+ if(item.name==ele.name){
|
|
|
|
+ item.url=ele.url
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // img = new Image()
|
|
|
|
+ // img.src = urlAll[index].url
|
|
})
|
|
})
|
|
- img = new Image()
|
|
|
|
- img.src = urlAll[i].url
|
|
|
|
|
|
|
|
- }
|
|
|
|
} else {}
|
|
} else {}
|
|
},
|
|
},
|
|
addImage(item) {
|
|
addImage(item) {
|
|
@@ -2018,35 +2119,79 @@ export default {
|
|
size: [],
|
|
size: [],
|
|
}
|
|
}
|
|
this.imageArrList = []
|
|
this.imageArrList = []
|
|
|
|
+
|
|
},
|
|
},
|
|
file(file) {
|
|
file(file) {
|
|
|
|
+ console.log(file)
|
|
var bmf = new BMF()
|
|
var bmf = new BMF()
|
|
var that = this
|
|
var that = this
|
|
- return new Promise(function (resolve, reject) {
|
|
|
|
- bmf.md5(file, (err, md5) => {
|
|
|
|
- that.urlList.name = file.name
|
|
|
|
- that.urlList.md5 = md5
|
|
|
|
- fileCheck({
|
|
|
|
- code: md5,
|
|
|
|
- projectId: that.currentMaterial.projectId,
|
|
|
|
- }).then((res) => {
|
|
|
|
- if (res.code == 0) {
|
|
|
|
- that.$message.error('此素材已经上传')
|
|
|
|
- that.repeat = true
|
|
|
|
- reject()
|
|
|
|
- } else {
|
|
|
|
- that.repeat = false
|
|
|
|
|
|
+
|
|
|
|
+ return new Promise( (resolve, reject)=> {
|
|
|
|
+
|
|
|
|
+ this.getVideoMsg(file).then((videoinfo) => {
|
|
|
|
+ const { duration, height, width } = videoinfo;
|
|
|
|
+ //获取到视频的时长,高度,宽度
|
|
|
|
+ bmf.md5(file, (err, md5) => {
|
|
|
|
+ videoinfo.name = file.name
|
|
|
|
+ videoinfo.md5 = md5
|
|
|
|
+ that.repeat = false
|
|
|
|
+ })
|
|
|
|
+ videoinfo.size=file.size;
|
|
|
|
+ videoinfo.format=file.type
|
|
|
|
+ console.log(videoinfo);
|
|
|
|
+ this.videoinfo=videoinfo
|
|
resolve()
|
|
resolve()
|
|
- // reject()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ });
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ getVideoMsg(file) {
|
|
|
|
+ // console.log('getVideoMsg')
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
+ let videoElement = document.createElement("video");
|
|
|
|
+ videoElement.src = URL.createObjectURL(file);
|
|
|
|
+ videoElement.addEventListener("loadedmetadata", function () {
|
|
|
|
+ let obj={
|
|
|
|
+ duration: videoElement.duration,
|
|
|
|
+ height: videoElement.videoHeight,
|
|
|
|
+ width: videoElement.videoWidth,
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ window.URL.revokeObjectURL(videoElement.src);
|
|
|
|
+ videoElement.remove()
|
|
|
|
+ resolve(obj);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ getImageMsg(file){
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
+ // let imageElement = document.createElement("image");
|
|
|
|
+ let imageElement = new Image();
|
|
|
|
+ let obj={}
|
|
|
|
+ imageElement.src = URL.createObjectURL(file);
|
|
|
|
+ // console.log(imageElement)
|
|
|
|
+ imageElement.onload=function(){
|
|
|
|
+ // console.log(imageElement.width)
|
|
|
|
+ obj={
|
|
|
|
+ height:imageElement.height,
|
|
|
|
+ width:imageElement.width
|
|
|
|
+ }
|
|
|
|
+ console.log(obj)
|
|
|
|
+ resolve(obj)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ });
|
|
},
|
|
},
|
|
fileWater(file) {
|
|
fileWater(file) {
|
|
|
|
+ console.log(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
|
|
|
|
|
|
+ var codeData = that.videoinfo.md5 != '' ? that.videoinfo.md5 : that.addImageData.code
|
|
console.log(codeData)
|
|
console.log(codeData)
|
|
this.urlListImage = {
|
|
this.urlListImage = {
|
|
url: [],
|
|
url: [],
|
|
@@ -2054,14 +2199,27 @@ export default {
|
|
name: [],
|
|
name: [],
|
|
size: [],
|
|
size: [],
|
|
}
|
|
}
|
|
- return new Promise(function (resolve, reject) {
|
|
|
|
|
|
+ this.imageinfo=[]
|
|
|
|
+ return new Promise( (resolve, reject)=> {
|
|
bmf.md5(file, (err, md5) => {
|
|
bmf.md5(file, (err, md5) => {
|
|
that.urlListImage.name.push(file.name)
|
|
that.urlListImage.name.push(file.name)
|
|
that.urlListImage.md5.push(md5)
|
|
that.urlListImage.md5.push(md5)
|
|
- that.urlListImage.size.push(file.size)
|
|
|
|
- resolve()
|
|
|
|
|
|
+ that.urlListImage.size.push(file.size)})
|
|
|
|
|
|
- })
|
|
|
|
|
|
+ this.getImageMsg(file).then((imageinfo) => {
|
|
|
|
+
|
|
|
|
+ imageinfo.size=file.size;
|
|
|
|
+ imageinfo.format=file.type;
|
|
|
|
+ imageinfo.name=file.name
|
|
|
|
+ bmf.md5(file, (err, md5) => {
|
|
|
|
+ imageinfo.md5=md5
|
|
|
|
+ this.imageinfo.push({
|
|
|
|
+ ...imageinfo
|
|
|
|
+ })
|
|
|
|
+ resolve()
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ });
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|