Commit c12d6500 authored by liqin's avatar liqin 💬

bug fixed

parent d32942a2
......@@ -74,7 +74,7 @@
<el-form-item label="请选择视频版权方" class="w50">
<el-select
placeholder="请选择视频版权方"
@focus="getAssetCopyrightData"
@focus="getVideoContentCopyrightData"
v-model="ruleForm.videoContentCopyrightOwnerId"
>
<el-option
......@@ -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: [
{
......@@ -226,11 +226,10 @@ export default {
},
methods: {
audioList(list){
this.ruleForm.audioUrlList = list;
this.ruleForm.audioIdList = list;
},
datumList(list){
console.log(list,"122212fefe")
this.ruleForm.materialUrlList = list;
this.ruleForm.datumIdList = list;
},
// 视频版权方名称id
videoCopyright(idlist) {
......@@ -244,10 +243,6 @@ export default {
// 二维码
qrcodeUrl(url){
this.ruleForm.qrcodeUrl = url
},
// 视频列表地址
videoList(list) {
this.ruleForm.videoUrlList = list;
},
getVideoContentCat(data) {
console.log(data);
......@@ -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,12 +312,10 @@ 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
......@@ -344,7 +331,6 @@ export default {
// 新增
submitForm(formName) {
this.$refs[formName].validate(valid => {
console.log(this.ruleForm)
if (valid) {
this.$https(
{
......@@ -354,12 +340,10 @@ 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 {
......@@ -379,13 +363,10 @@ 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 {
......@@ -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,20 +400,15 @@ 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);
});
},
......@@ -444,12 +419,9 @@ 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);
});
},
......@@ -460,12 +432,9 @@ 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);
});
},
......@@ -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"
......@@ -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,18 +259,16 @@ 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,17 +293,14 @@ 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!!");
......@@ -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,14 +326,11 @@ 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 {
......@@ -355,7 +342,6 @@ export default {
// 修改版权方
updateForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
this.$https(
{
......@@ -364,13 +350,10 @@ 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 {
......@@ -383,7 +366,7 @@ export default {
this.$refs[formName].resetFields();
history.go(-1);
},
getAssetCopyrightData(){
getVideoContentCopyrightData() {
let vm = this;
vm.$https({
url: "copyrightOwner/getList",
......@@ -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