Commit c12d6500 authored by liqin's avatar liqin 💬

bug fixed

parent d32942a2
......@@ -14,11 +14,11 @@
:before-upload="beforeAvatarUpload"
>
<i class="el-icon-plus fileUpload"></i>
</el-upload>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
</div>
</template>
<script>
......@@ -60,7 +60,7 @@ export default {
return item.id;
})
this.$emit('audioList', newArray)
} else {
_this.$message.error(resData.msg || resData.message);
}
......@@ -70,7 +70,7 @@ export default {
_this.$message.error(err.msg || err.message);
});
},
uploadFile(file) {
this.filedata.append('file', file.file)
......@@ -96,4 +96,4 @@ export default {
font-size: 24px;
font: #ccc;
}
</style>
\ No newline at end of file
</style>
......@@ -14,11 +14,11 @@
:before-upload="beforeAvatarUpload"
>
<i class="el-icon-plus fileUpload"></i>
</el-upload>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
</div>
</template>
<script>
......@@ -60,7 +60,7 @@ export default {
return item.id;
})
this.$emit('datumList', newArray)
} else {
_this.$message.error(resData.msg || resData.message);
}
......@@ -70,7 +70,7 @@ export default {
_this.$message.error(err.msg || err.message);
});
},
uploadFile(file) {
this.filedata.append('file', file.file)
......@@ -96,4 +96,4 @@ export default {
font-size: 24px;
font: #ccc;
}
</style>
\ No newline at end of file
</style>
......@@ -14,11 +14,11 @@
:before-upload="beforeAvatarUpload"
>
<i class="el-icon-plus fileUpload"></i>
</el-upload>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
</div>
</template>
<script>
......@@ -60,7 +60,7 @@ export default {
return item.id;
})
this.$emit('videoList', newArray)
} else {
_this.$message.error(resData.msg || resData.message);
}
......@@ -70,7 +70,7 @@ export default {
_this.$message.error(err.msg || err.message);
});
},
uploadFile(file) {
this.filedata.append('file', file.file)
......@@ -136,4 +136,4 @@ export default {
font-size: 24px;
font: #ccc;
}
</style>
\ No newline at end of file
</style>
......@@ -32,7 +32,7 @@ export default {
methods: {
// 图片上传成功的返回值
handleAvatarSuccess(res, file) {
console.log(res)
console.log(res.data.url)
this.$emit('imgUrl', res.data.url)
......@@ -51,4 +51,4 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
</style>
......@@ -74,7 +74,7 @@
<el-form-item label="请选择视频版权方" class="w50">
<el-select
placeholder="请选择视频版权方"
@focus="getAssetCopyrightData"
@focus="getVideoContentCopyrightData"
v-model="ruleForm.videoContentCopyrightOwnerId"
>
<el-option
......@@ -105,7 +105,7 @@
placeholder="请选择视频"
@focus="getVideoData"
v-model="ruleForm.videoContentId"
>
>
<el-option
v-for="item in videoContentId"
:label="item.name"
......@@ -114,12 +114,12 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item class="w50" prop="audioUrlList"></el-form-item>
<el-form-item class="w50" prop="audioIdList"></el-form-item>
<el-form-item label="导览音频" class="w50">
<!-- <upload-img @imgUrl="imgUrl"></upload-img> -->
<upload-audio @audioList="audioList"></upload-audio>
<upload-audio @datumList="audioList"></upload-audio>
</el-form-item>
<el-form-item label="参考资料" class prop="materialUrlList">
<el-form-item label="参考资料" class prop="datumIdList">
<upload-datum @datumList="datumList"></upload-datum>
</el-form-item>
</el-form>
......@@ -163,7 +163,6 @@ export default {
boardCopyrightOwnerId:[],
exhibitionBoardCatId:[],
videoContentId:[],
type: this.$route.query.type,
dialogVisible: false,
formLabelWidth: "100px",
form: {
......@@ -176,7 +175,8 @@ export default {
boardCopyrightOwnerId:"",
videoContentCopyrightOwnerId: "",
videoContentCatId: "",
videoUrlList: []
audioIdList: [],
datumIdList: []
},
videoContentCat: [
{
......@@ -225,13 +225,12 @@ export default {
this.init()
},
methods: {
audioList(list){
this.ruleForm.audioUrlList = list;
},
datumList(list){
console.log(list,"122212fefe")
this.ruleForm.materialUrlList = list;
},
audioList(list){
this.ruleForm.audioIdList = list;
},
datumList(list){
this.ruleForm.datumIdList = list;
},
// 视频版权方名称id
videoCopyright(idlist) {
this.ruleForm.videoContentCopyrightOwnerId = idlist;
......@@ -245,11 +244,7 @@ export default {
qrcodeUrl(url){
this.ruleForm.qrcodeUrl = url
},
// 视频列表地址
videoList(list) {
this.ruleForm.videoUrlList = list;
},
getVideoContentCat(data) {
getVideoContentCat(data) {
console.log(data);
console.log(this.ruleForm.videoContentCatId);
},
......@@ -257,7 +252,7 @@ export default {
if (this.$route.query.type === "Update") {
this.getInfo(this.$route.query.id);
this.getVideoContentCatData();
this.getAssetCopyrightData();
this.getVideoContentCopyrightData();
this.getExhibitionBoardCatId();
this.getBoardCopyrightOwnerId();
this.getVideoData();
......@@ -285,20 +280,14 @@ export default {
boardCopyrightOwnerId:data.boardCopyrightOwnerId,
cover:data.cover,
exhibitionBoardCatId:data.exhibitionBoardCatId,
guideAudioUrl:data.guideAudioUrl,
id:data.id,
name:data.name,
qrcodeUrl:data.qrcodeUrl,
refMaterialUrl:data.refMaterialUrl,
remarks:data.remarks,
audioUrlList:data.audioUrlList,
materialUrlList:data.materialUrlList
// videoUrlList:data.videoUrlList
// 字段对不上
audioIdList:data.audioIdList,
datumIdList:data.datumIdList
}
})
.catch(function(err) {
}).catch(function(err) {
console.log(err);
});
},
......@@ -323,18 +312,16 @@ export default {
authType: this.backToken
},
this.classForm
)
.then(res => {
).then(res => {
this.$message({ type: "success", message: "新增分类成功!" });
this.dialogVisible = false;
})
.catch(function(err) {
}).catch(function(err) {
this.$message({
type: "fail",
message: "新增失败!" + err.response.data.msg
});
console.log(err);
});
});
} else {
console.log("error submit!!");
return false;
......@@ -344,7 +331,6 @@ export default {
// 新增
submitForm(formName) {
this.$refs[formName].validate(valid => {
console.log(this.ruleForm)
if (valid) {
this.$https(
{
......@@ -354,14 +340,12 @@ export default {
},
// this.ruleForm
this.$qs.stringify(this.ruleForm)
)
.then(res => {
).then(res => {
this.$message({ type: "success", message: "新增成功!" });
history.go(-1);
})
.catch(function(err) {
}).catch(function(err) {
console.log(err);
});
});
} else {
console.log("error submit!!");
return false;
......@@ -379,15 +363,12 @@ export default {
authType: this.backToken
},
this.$qs.stringify(this.ruleForm)
// this.ruleForm
)
.then(res => {
).then(res => {
this.$message({ type: "success", message: "修改成功!" });
history.go(-1);
})
.catch(function(err) {
}).catch(function(err) {
console.log(err);
});
});
} else {
console.log("error submit!!");
return false;
......@@ -399,7 +380,7 @@ export default {
history.go(-1);
},
// 获取视频版权方
getAssetCopyrightData() {
getVideoContentCopyrightData() {
let vm = this;
vm.$https(
{
......@@ -410,8 +391,7 @@ export default {
{ copyrightOwnerType: "VIDEO_CONTENT" }
)
.then(res => {
let data = res.data.data;
this.copyrightOwner = data;
this.copyrightOwner = res.data.data;
})
.catch(function(err) {
console.log(err);
......@@ -420,22 +400,17 @@ export default {
// 获取展板版权方
getBoardCopyrightOwnerId() {
let vm = this;
vm.$https(
{
vm.$https({
url: "copyrightOwner/getList",
method: "get",
authType: this.backToken
},
{ copyrightOwnerType: "EXHIBITION_BOARD" }
)
.then(res => {
let data = res.data.data;
this.boardCopyrightOwnerId = data;
console.log(this.boardCopyrightOwnerId)
})
.catch(function(err) {
).then(res => {
this.boardCopyrightOwnerId = res.data.data;
}).catch(function(err) {
console.log(err);
});
});
},
//获取展板分类
getExhibitionBoardCatId(){
......@@ -444,14 +419,11 @@ export default {
url: "exhibitionBoardCat/getList",
method: "get",
authType: this.backToken
})
.then(res => {
let data = res.data.data;
this.exhibitionBoardCatId = data;
})
.catch(function(err) {
}).then(res => {
this.exhibitionBoardCatId = res.data.data;
}).catch(function(err) {
console.log(err);
});
});
},
// 获取视频分类列表
getVideoContentCatData() {
......@@ -460,14 +432,11 @@ export default {
url: "videoContentCat/getList",
method: "get",
authType: this.backToken
})
.then(res => {
let data = res.data.data;
this.videoContentCat = data;
})
.catch(function(err) {
}).then(res => {
this.videoContentCat = res.data.data;
}).catch(function(err) {
console.log(err);
});
});
},
// 获取视频列表
getVideoData() {
......@@ -476,16 +445,12 @@ export default {
url: "videoContent/getList",
method: "get",
authType: this.backToken
})
.then(res => {
let data = res.data.data;
this.videoContentId = data;
})
.catch(function(err) {
}).then(res => {
this.videoContentId = res.data.data;
}).catch(function(err) {
console.log(err);
});
});
},
close() {
history.go(-1);
},
......
......@@ -27,9 +27,9 @@
<el-form-item class="selectH100" label="请选择预设视频分类">
<el-select
placeholder="请选择预设视频分类"
@focus="getAssetTypeData"
@focus="getVideoContentCatData"
multiple
v-model="ruleForm.assetTypeIdList"
v-model="ruleForm.videoContentCatIdList"
@change="getSelectDep"
>
<el-checkbox :style="selfstyle" v-model="checkedThing" @change="selectAllThing">全选</el-checkbox>
......@@ -44,7 +44,7 @@
<el-form-item label="请选择视频版权方">
<el-select
placeholder="请选择视频版权方"
@focus="getAssetCopyrightData"
@focus="getVideoContentCopyrightData"
v-model="ruleForm.videoContentCopyrightOwnerId"
>
<el-option
......@@ -62,9 +62,9 @@
<el-form-item label="请选择预设视频分类">
<el-select
placeholder="请选择预设视频分类"
@focus="getAssetTypeData"
v-model="ruleForm.assetTypeId"
@change="getAssetType"
@focus="getVideoContentCatData"
v-model="ruleForm.videoContentCatId"
@change="getVideoContentCat"
>
<el-option
v-for="item in videoContentCat"
......@@ -143,7 +143,7 @@ import uploadDatum from '@/page/content/components/uploadVue/uploadDatum'
import mulDisplay from '@/page/content/components/mulClassify/mulDisplay'
import addCopyright from '@/page/content/components/dialog/addCopyright'
export default {
components:{
components:{
uploadImg,
uploadFile,
uploadDatum,
......@@ -164,9 +164,9 @@ export default {
ruleForm: {
name: "",
videoContentCopyrightOwnerId:"",
assetTypeId: "",
videoContentCatId: "",
thumbnail:"",
videoUrlList:[]
videoFileIdList:[]
},
videoContentCat: [
{
......@@ -236,18 +236,18 @@ export default {
},
// 视频列表地址
videoList(list){
this.ruleForm.videoUrlList = list
this.ruleForm.videoFileIdList = list
},
init() {
if (this.$route.query.type === "Update") {
this.getInfo(this.$route.query.id);
this.getAssetTypeData()
this.getAssetCopyrightData()
this.getVideoContentCatData()
this.getVideoContentCopyrightData()
}
},
getAssetType(data){
getVideoContentCat(data){
console.log(data)
console.log(this.ruleForm.assetTypeId)
console.log(this.ruleForm.videoContentCatId)
},
// 获取版权方详情
getInfo(id) {
......@@ -259,20 +259,18 @@ export default {
authType: this.backToken
}
// param
)
.then(res => {
).then(res => {
let data = res.data.data;
// this.ruleForm = data;
this.ruleForm.id = data.id
this.ruleForm.name = data.name
this.ruleForm.videoContentCopyrightOwnerId = data.videoContentCopyrightOwnerId
this.ruleForm.assetTypeId = data.assetTypeId
this.ruleForm.videoContentCatId = data.videoContentCatId
this.ruleForm.thumbnail = data.thumbnail
this.ruleForm.videoUrlList = data.videoUrlList
})
.catch(function(err) {
this.ruleForm.videoFileIdList = data.videoFileIdList
}).catch(function(err) {
console.log(err);
});
});
},
// 新建视频分类
......@@ -295,18 +293,15 @@ export default {
authType: this.backToken
},
this.classForm
)
.then(res => {
).then(res => {
this.$message({ type: "success", message: "新增分类成功!" });
this.dialogVisible = false;
})
.catch(function(err) {
}).catch(function(err) {
this.$message({
type: "fail",
message: "新增失败!" + err.response.data.msg
});
console.log(err);
});
});
} else {
console.log("error submit!!");
return false;
......@@ -324,11 +319,6 @@ export default {
// 新增
submitForm(formName) {
this.$refs[formName].validate(valid => {
// this.ruleForm.videoContentCopyrightOwnerId = ["1373225989501456385"]
// this.ruleForm.assetTypeIdList = []
// this.ruleForm.videoUrlList = [
// "http://111.203.232.175:8085/group1/M00/00/39/wKhuVWBgIvaANgtZAAAAAAAAAAA947.mp4"
// ]
if (valid) {
this.$https(
{
......@@ -336,16 +326,13 @@ export default {
method: "post",
authType: this.backToken
},
// this.ruleForm
this.$qs.stringify(this.ruleForm)
)
.then(res => {
).then(res => {
this.$message({ type: "success", message: "新增成功!" });
history.go(-1);
})
.catch(function(err) {
}).catch(function(err) {
console.log(err);
});
});
} else {
console.log("error submit!!");
return false;
......@@ -355,7 +342,6 @@ export default {
// 修改版权方
updateForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
this.$https(
{
......@@ -364,15 +350,12 @@ export default {
authType: this.backToken
},
this.$qs.stringify(this.ruleForm)
// this.ruleForm
)
.then(res => {
).then(res => {
this.$message({ type: "success", message: "修改成功!" });
history.go(-1);
})
.catch(function(err) {
}).catch(function(err) {
console.log(err);
});
});
} else {
console.log("error submit!!");
return false;
......@@ -383,8 +366,8 @@ export default {
this.$refs[formName].resetFields();
history.go(-1);
},
getAssetCopyrightData(){
let vm = this;
getVideoContentCopyrightData() {
let vm = this;
vm.$https({
url: "copyrightOwner/getList",
method: "get",
......@@ -400,37 +383,30 @@ export default {
});
},
// 获取视频分类列表
getAssetTypeData() {
getVideoContentCatData() {
let vm = this;
vm.$https({
url: "videoContentCat/getList",
method: "get",
authType: this.backToken
})
.then(res => {
let data = res.data.data;
this.videoContentCat = data;
})
.catch(function(err) {
}).then(res => {
this.videoContentCat = res.data.data;
}).catch(function(err) {
console.log(err);
});
});
},
getSelectDep(assetTypeIdList) {
if (assetTypeIdList.length === this.videoContentCat.length) {
this.checkedThing = true;
} else {
this.checkedThing = false;
}
getSelectDep(videoContentCatIdList) {
this.checkedThing = videoContentCatIdList.length === this.videoContentCat.length;
},
selectAllThing() {
// debugger
this.ruleForm.assetTypeIdList = [];
this.ruleForm.videoContentCatIdList = [];
if (this.checkedThing) {
this.videoContentCat.map(item => {
this.ruleForm.assetTypeIdList.push(item.id);
this.ruleForm.videoContentCatIdList.push(item.id);
});
} else {
this.ruleForm.assetTypeIdList = [];
this.ruleForm.videoContentCatIdList = [];
}
}
}
......
......@@ -39,18 +39,6 @@
>
<el-table-column type="index" width="120" label="序号"></el-table-column>
<el-table-column show-overflow-tooltip label="视频名称" prop="name"></el-table-column>
<<<<<<< HEAD
<el-table-column show-overflow-tooltip label="版权方" prop="assetCopyrightOwnerName"></el-table-column>
<el-table-column label="视频分类" prop="assetTypeName"></el-table-column>
<el-table-column label="审核状态" prop="auditStatus">
<template slot-scope="scope">
<span v-if="scope.row.auditStatus === 'TBC'">待初审</span>
<span v-else-if="scope.row.auditStatus === 'REFUSED'">已驳回</span>
<span v-else-if="scope.row.auditStatus === 'TBCA'">待复审</span>
<span v-else-if="scope.row.auditStatus === 'APPROVED_FINAL'">通过</span>
</template>
</el-table-column>
=======
<el-table-column show-overflow-tooltip label="版权方" prop="videoContentCopyrightOwnerName"></el-table-column>
<el-table-column label="视频分类" prop="videoContentCatName"></el-table-column>
<el-table-column label="审核状态" prop="auditStatus">
......@@ -61,7 +49,6 @@
<span v-else-if="scope.row.auditStatus === 'APPROVED_FINAL'">通过</span>
</template>
</el-table-column>
>>>>>>> master
<el-table-column label="操作" header-align="center" align="center">
<template slot-scope="scope" width="220">
<div class="table-btn-group">
......@@ -534,7 +521,7 @@ export default {
})
.then(
res => {
if (res.data.status == 201 || res.data.status == 200) {
if (res.data.status === 201 || res.data.status === 200) {
this.$message({
type: "success",
message: "删除成功!"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment