Commit e6d6d4b0 authored by qzhxx's avatar qzhxx

视频修改

parent d32942a2
......@@ -2,7 +2,7 @@
<!--新增弹框-->
<el-dialog
custom-class="party-dialog"
title="新建视频分类"
title="新建视频版权方"
width="468px"
:visible.sync="dialogVisible"
:before-close="close"
......@@ -20,22 +20,22 @@
<el-form-item label="版权方名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
<el-form-item label="版权方有效期" required>
<el-form-item label="版权方有效期" prop="value1">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="value1"
v-model="ruleForm.value1"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item class="selectH100" label="请选择预设视频分类">
<el-form-item class="selectH100" label="请选择预设视频分类" prop="videoContentCatIdList">
<el-select
placeholder="请选择预设视频分类"
@focus="getAssetTypeData"
multiple
v-model="ruleForm.assetTypeIdList"
v-model="ruleForm.videoContentCatIdList"
@change="getSelectDep"
>
<el-checkbox :style="selfstyle" v-model="checkedThing" @change="selectAllThing">全选</el-checkbox>
......@@ -48,7 +48,7 @@
</el-form>
</div>
<div slot="footer" class="dialog-footer btn-group">
<el-button size="mini" type="primary" @click="save('classForm')">确定</el-button>
<el-button size="mini" type="primary" @click="submitForm('ruleForm')">确定</el-button>
<el-button size="mini" @click="close">取 消</el-button>
</div>
</el-dialog>
......@@ -58,17 +58,14 @@
export default {
data() {
return {
dialogVisible:true,
value1:[],
dialogVisible:false,
ruleForm: {
assetTypeIdList: [],
name: "",
ownerType: "VIDEO_CONTENT"
},
ruleForm: {
assetTypeIdList: [],
videoContentCatIdList: [],
name: "",
ownerType: "VIDEO_CONTENT"
},
videoContentCat: [
{
value: "Beijing",
......@@ -91,61 +88,76 @@ export default {
{ required: true, message: "请输入版权方名称", trigger: "blur" }
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
],
date1: [
{
type: "date",
required: true,
message: "请选择日期",
trigger: "change"
}
],
date2: [
{
type: "date",
required: true,
message: "请选择时间",
trigger: "change"
}
videoContentCatIdList:[
{required: true, message: "请选择视频分类", trigger: "change" }
],
type: [
{
type: "array",
required: true,
message: "请至少选择一个活动性质",
trigger: "change"
}
],
resource: [
{ required: true, message: "请选择活动资源", trigger: "change" }
],
desc: [{ required: true, message: "请填写活动形式", trigger: "blur" }]
value1:[
{ required: true, message: "请填写版权方有效期", trigger: "change" }
]
}
};
},
methods: {
// 弹窗保存
save(formName) {
submitForm(formName) {
this.ruleForm.expireDateEnd = this.ruleForm.value1[1];
this.ruleForm.expireDateStart = this.ruleForm.value1[0];
this.$refs[formName].validate(valid => {
this.ruleForm.expireDateEnd = this.value1[1];
this.ruleForm.expireDateStart = this.value1[0];
if (valid) {
this.$https(
{
url: "videoContentCat/save",
url: "copyrightOwner/save",
method: "post",
authType: this.backToken
},
// this.ruleForm
this.$qs.stringify(this.ruleForm)
)
.then(res => {
if(res.resultCode === "200"){
this.$message({ type: "success", message: "新增成功!" });
history.go(-1);
}else{
this.$message({ type: "error", message: res.message });
}
})
.catch(function(err) {
console.log(err);
});
} else {
console.log("error submit!!");
return false;
}
});
},
save(formName) {
const _this = this
_this.ruleForm.expireDateEnd = this.ruleForm.value1[1];
_this.ruleForm.expireDateStart = this.ruleForm.value1[0];
this.$refs[formName].validate(valid => {
if (valid) {
this.$https(
{
url: "copyrightOwner/save",
method: "post",
authType: this.backToken
},
this.classForm
// this.ruleForm
_this.$qs.stringify(this.ruleForm)
)
.then(res => {
this.$message({ type: "success", message: "新增分类成功!" });
this.dialogVisible = false;
if(res.resultCode === "200"){
_this.$message({ type: "success", message: "新增成功!" });
_this.dialogVisible =false
}else{
_this.$message({ type: "error", message: res.message });
}
})
.catch(function(err) {
this.$message({
type: "fail",
message: "新增失败!" + err.response.data.msg
});
console.log(err);
});
} else {
......@@ -157,10 +169,10 @@ export default {
// 新增关闭
close() {
this.dialogVisible = false;
for (let key in this.classForm) {
this.classForm[key] = null;
for (let key in this.ruleForm) {
this.ruleForm[key] = null;
}
this.$refs["classForm"].resetFields();
this.$refs["ruleForm"].resetFields();
},
// 获取视频分类列表
getAssetTypeData() {
......@@ -180,8 +192,8 @@ export default {
console.log(err);
});
},
getSelectDep(assetTypeIdList) {
if (assetTypeIdList.length === this.videoContentCat.length) {
getSelectDep(videoContentCatIdList) {
if (videoContentCatIdList.length === this.videoContentCat.length) {
this.checkedThing = true;
} else {
this.checkedThing = false;
......@@ -189,13 +201,13 @@ export default {
},
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 = [];
}
}
}
......
<template>
<el-dialog
custom-class="party-dialog msg-dialog noHeader"
:visible.sync="dialogVisible"
width="500px"
>
<div class="dialog-content">
<img :src="getImgUrl()" alt="">
<p>{{msgInfo.des}}</p>
</div>
<div slot="footer" class="dialog-footer btn-group">
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
data(){
return{
dialogVisible:false,
}
},
props:{
msgInfo:{
type: Object,
default:()=>{
return {
type:'',
des:''
}
}
}
},
mounted(){
},
methods:{
getImgUrl(){
switch (this.msgInfo.type) {
case "wait":
return require('@/assets/wait.png')
break;
case "success":
return require('@/assets/success.png')
break;
default:
break;
}
}
}
}
</script>
<style lang="less" scoped>
.party-dialog.msg-dialog{
.dialog-content{
img{
display: block;
width: 160px;
margin: 0 auto;
}
p{
font-size: 20px;
color: @font-color;
font-weight: bold;
margin-top: 20px;
text-align: center;
}
}
}
</style>
......@@ -88,7 +88,7 @@
ref="classForm"
label-width="80px"
label-position="top"
:rules="rules"
:rules="rule"
id="ruleo"
class="party-form"
>
......@@ -178,6 +178,11 @@ export default {
},
typeList: [],
rule:{
name: [
{ required: true, message: "请输入展板分类名称", trigger: "blur" }
],
},
rules: {
sort: [
{ required: true, message: "请输入顺序值", trigger: "change" },
......
<template>
<div class="listPage H100">
<msg-dialogs ref="msgDialog" :msgInfo="msgInfo" />
<div class="search-container">
<el-form :inline="true" :model="form" class="search-form" onsubmit="return false;">
<el-form-item label="版权方名称">
......@@ -113,10 +114,16 @@
></el-pagination>
</div>
</div>
</div>
</template>
<script>
// import accountTable from "@/page/accounts/components/accountTable";
import msgDialog from "@/page/content/components/msgDialog.vue";
export default {
components: {
msgDialog
},
data() {
var checkIsNull = (rule, value, callback) => {
if (value) {
......@@ -128,6 +135,7 @@ export default {
}
};
return {
msgInfo: {},
value1: "",
page: { currentPage: 1, pageSize: 10, total: 0 },
tableData: [],
......@@ -173,6 +181,7 @@ export default {
name: ""
};
},
computed: {},
mounted() {
this.onSearch();
......@@ -394,7 +403,7 @@ export default {
res => {
// this.$message({ type: "success", message: "删除成功!" });
// alert("已提交审核!")
this.msgInfo = {
_this.msgInfo = {
type: "wait",
des: `申请已提交,待审核…`,
};
......
......@@ -91,7 +91,7 @@
ref="classForm"
label-width="80px"
label-position="top"
:rules="rules"
:rules="rule"
id="ruleo"
class="party-form"
>
......@@ -197,6 +197,11 @@ export default {
ownerType:'EXHIBITION_BOARD',
},
typeList: [],
rule:{
name: [
{ required: true, message: "请输入展板分类名称", trigger: "blur" }
],
},
rules: {
sort: [
{ required: true, message: "请输入顺序值", trigger: "change" },
......
......@@ -218,6 +218,7 @@ export default {
console.log(val);
},
moveUpward(row, index) {
this.getSort(row.id,(this.tableData[index - 1]).id)
if (index > 0) {
let upData = this.tableData[index - 1];
this.tableData.splice(index - 1, 1);
......@@ -230,6 +231,7 @@ export default {
}
},
moveDown(row, index) {
this.getSort(row.id,(this.tableData[index + 1]).id)
if (index + 1 == this.tableData.length) {
this.$message({
message: "已经是最后一条,下移失败",
......@@ -240,7 +242,36 @@ export default {
this.tableData.splice(index + 1, 1);
this.tableData.splice(index, 0, downData);
}
}
},
// 排序接口
getSort(sourceId,targetId){
let _this = this;
_this
.$https({
method: "put",
url: "learningContentBoard/sort",
authType: this.backToken
},
_this.$qs.stringify({
sourceId:sourceId,
targetId:targetId
}))
.then(
res => {
this.$message({
type: "success",
message: "成功!"
});
_this.Search();
},
error => {
this.$message({
type: "fail",
message: "失败!" + error.response.data
});
}
);
},
}
};
</script>
......
......@@ -30,7 +30,7 @@
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips">展示所有单位的互动频次统计图及统计表格</span>
<span class="page-tips">可通过学习内容名称搜索进行快速信息筛选。可对每条学习内容进行排序,可对学习内容信息进行修改、查看、禁用。</span>
</div>
</div>
<div class="table-content">
......@@ -88,6 +88,18 @@
<i class="icon-table icon-disable"></i>
</el-button>
</el-tooltip>
<el-button
type="text"
style="padding:0"
:disabled="scope.$index == 0"
@click="moveUpward(scope.row, scope.$index)"
>上移</el-button>
<el-button
type="text"
style="padding:0"
:disabled="(scope.$index + 1) == tableData.length"
@click="moveDown(scope.row, scope.$index)"
>下移</el-button>
<!-- <el-tooltip content="删除" placement="top">
<el-button circle @click="handleDelete(scope.row)">
<i class="icon-table icon-del"></i>
......@@ -177,6 +189,64 @@ export default {
},
components: {},
methods: {
// 上移
moveUpward(row, index) {
this.getSort(row.id,(this.tableData[index - 1]).id)
if (index > 0) {
let upData = this.tableData[index - 1];
this.tableData.splice(index - 1, 1);
this.tableData.splice(index, 0, upData);
} else {
this.$message({
message: "已经是第一条,上移失败",
type: "warning"
});
}
},
// 下移
moveDown(row, index) {
this.getSort(row.id,(this.tableData[index + 1]).id)
if (index + 1 == this.tableData.length) {
this.$message({
message: "已经是最后一条,下移失败",
type: "warning"
});
} else {
let downData = this.tableData[index + 1];
this.tableData.splice(index + 1, 1);
this.tableData.splice(index, 0, downData);
}
},
// 排序接口
getSort(sourceId,targetId){
let _this = this;
_this
.$https({
method: "put",
url: "learningContent/sort",
authType: this.backToken
},
_this.$qs.stringify({
sourceId:sourceId,
targetId:targetId
}))
.then(
res => {
this.$message({
type: "success",
message: "成功!"
});
_this.Search();
},
error => {
this.$message({
type: "fail",
message: "失败!" + error.response.data
});
}
);
},
// 渲染父级权限
getPermis() {
let vm = this;
......
......@@ -102,11 +102,11 @@
ref="classForm"
label-width="80px"
label-position="top"
:rules="rules"
:rules="rule"
id="ruleo"
class="party-form"
>
<el-form-item label="视频分类名称" prop="name">
<el-form-item label="学习项目名称" prop="name">
<el-input v-model="classForm.name"></el-input>
</el-form-item>
<el-form-item label="备注">
......@@ -198,6 +198,11 @@ export default {
remarks:""
},
typeList: [],
rule:{
name: [
{ required: true, message: "请输入学习项目名称", trigger: "blur" }
],
},
rules: {
sort: [
{ required: true, message: "请输入顺序值", trigger: "change" },
......
......@@ -201,9 +201,9 @@ export default {
},
typeList: [],
rules: {
sort: [
{ required: true, message: "请输入顺序值", trigger: "change" },
{ pattern: /^(\d{1,5})?$/, message: "排序值为低于5位数的纯数字" }
name: [
{ required: true, message: "请输入分类名称", trigger: "change" },
// { pattern: /^(\d{1,5})?$/, message: "排序值为低于5位数的纯数字" }
],
menuName: [
{ required: true, message: "请输入菜单名称", trigger: "change" },
......
......@@ -29,7 +29,7 @@
placeholder="请选择预设视频分类"
@focus="getAssetTypeData"
multiple
v-model="ruleForm.assetTypeIdList"
v-model="ruleForm.videoContentCatIdListList"
@change="getSelectDep"
>
<el-checkbox :style="selfstyle" v-model="checkedThing" @change="selectAllThing">全选</el-checkbox>
......@@ -41,7 +41,12 @@
></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="请选择视频版权方">
<el-form-item class="addTip">
<add-copyright ref="addCopyright"></add-copyright>
<span>若没有相应的视频版权方,请点击</span>
<el-button type="text" @click="addVideoCopyright">新建视频版权方</el-button>
</el-form-item>
<el-form-item label="请选择视频版权方" prop="videoContentCopyrightOwnerId">
<el-select
placeholder="请选择视频版权方"
@focus="getAssetCopyrightData"
......@@ -59,11 +64,11 @@
<span>若没有相应的视频分类,请点击</span>
<el-button type="text" @click="addVideoClass">新建视频分类</el-button>
</el-form-item>
<el-form-item label="请选择预设视频分类">
<el-form-item label="请选择视频分类" prop="videoContentCatIdList">
<el-select
placeholder="请选择预设视频分类"
@focus="getAssetTypeData"
v-model="ruleForm.assetTypeId"
v-model="ruleForm.videoContentCatIdList"
@change="getAssetType"
>
<el-option
......@@ -74,10 +79,11 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="视频缩略图">
<el-form-item label="视频缩略图" required>
<upload-img @imgUrl="imgUrl"></upload-img>
</el-form-item>
<el-form-item label="上传视频">
<el-form-item label="上传视频" required>
<p style="color:red">(支持上传多个视频及视频文件夹,视频语言支持汉语、蒙语、藏语、维吾尔语、英语,视频命名规定:视频名称+语言)</p>
<upload-file @videoList="videoList"></upload-file>
</el-form-item>
</el-form>
......@@ -95,7 +101,7 @@
ref="classForm"
label-width="80px"
label-position="top"
:rules="rules"
:rules="rule"
id="ruleo"
class="party-form"
>
......@@ -164,7 +170,7 @@ export default {
ruleForm: {
name: "",
videoContentCopyrightOwnerId:"",
assetTypeId: "",
videoContentCatIdList: "",
thumbnail:"",
videoUrlList:[]
},
......@@ -185,39 +191,29 @@ export default {
width: "100%",
paddingRight: "10px"
},
rule:{
name: [
{ required: true, message: "请输入视频分类名称", trigger: "blur" }
],
},
rules: {
name: [
{ required: true, message: "请输入版权方名称", trigger: "blur" }
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
],
date1: [
{
type: "date",
required: true,
message: "请选择日期",
trigger: "change"
}
videoContentCopyrightOwnerId:[
{ required: true, message: "请选择视频版权方", trigger: "change" }
],
date2: [
{
type: "date",
required: true,
message: "请选择时间",
trigger: "change"
}
videoContentCatIdList:[
{ required: true, message: "请选择视频分类", trigger: "change" }
],
type: [
{
type: "array",
required: true,
message: "请至少选择一个活动性质",
trigger: "change"
}
thumbnail:[
{ required: true, message: "请上传视频缩略图", trigger: "change" }
],
resource: [
{ required: true, message: "请选择活动资源", trigger: "change" }
videoUrlList:[
{ required: true, message: "请上传视频", trigger: "change" }
],
desc: [{ required: true, message: "请填写活动形式", trigger: "blur" }]
}
};
},
......@@ -247,7 +243,7 @@ export default {
},
getAssetType(data){
console.log(data)
console.log(this.ruleForm.assetTypeId)
console.log(this.ruleForm.videoContentCatIdList)
},
// 获取版权方详情
getInfo(id) {
......@@ -266,7 +262,7 @@ export default {
this.ruleForm.id = data.id
this.ruleForm.name = data.name
this.ruleForm.videoContentCopyrightOwnerId = data.videoContentCopyrightOwnerId
this.ruleForm.assetTypeId = data.assetTypeId
this.ruleForm.videoContentCatIdList = data.videoContentCatIdList
this.ruleForm.thumbnail = data.thumbnail
this.ruleForm.videoUrlList = data.videoUrlList
})
......@@ -274,7 +270,10 @@ export default {
console.log(err);
});
},
// 新建展板分类
addVideoCopyright(){
this.$refs.addCopyright.dialogVisible = true
},
// 新建视频分类
addVideoClass() {
this.dialogVisible = true;
......@@ -294,7 +293,8 @@ export default {
// },
authType: this.backToken
},
this.classForm
this.$qs.stringify(this.classForm)
// this.classForm
)
.then(res => {
this.$message({ type: "success", message: "新增分类成功!" });
......@@ -325,7 +325,7 @@ export default {
submitForm(formName) {
this.$refs[formName].validate(valid => {
// this.ruleForm.videoContentCopyrightOwnerId = ["1373225989501456385"]
// this.ruleForm.assetTypeIdList = []
// this.ruleForm.videoContentCatIdListList = []
// this.ruleForm.videoUrlList = [
// "http://111.203.232.175:8085/group1/M00/00/39/wKhuVWBgIvaANgtZAAAAAAAAAAA947.mp4"
// ]
......@@ -340,8 +340,13 @@ export default {
this.$qs.stringify(this.ruleForm)
)
.then(res => {
this.$message({ type: "success", message: "新增成功!" });
history.go(-1);
if(res.data.resultCode === "200"){
this.$message({ type: "success", message: "新增视频申请已提交,待审核!" });
history.go(-1);
}else{
this.$message({ type: "error", message: res.data.message });
}
})
.catch(function(err) {
console.log(err);
......@@ -367,8 +372,12 @@ export default {
// this.ruleForm
)
.then(res => {
this.$message({ type: "success", message: "修改成功!" });
history.go(-1);
if(res.data.resultCode === "200"){
this.$message({ type: "success", message: "修改视频申请已提交,待审核!" });
history.go(-1);
}else{
this.$message({ type: "error", message: res.data.message });
}
})
.catch(function(err) {
console.log(err);
......@@ -383,6 +392,7 @@ export default {
this.$refs[formName].resetFields();
history.go(-1);
},
// 获取展板分类列表
getAssetCopyrightData(){
let vm = this;
vm.$https({
......@@ -415,8 +425,8 @@ export default {
console.log(err);
});
},
getSelectDep(assetTypeIdList) {
if (assetTypeIdList.length === this.videoContentCat.length) {
getSelectDep(videoContentCatIdListList) {
if (videoContentCatIdListList.length === this.videoContentCat.length) {
this.checkedThing = true;
} else {
this.checkedThing = false;
......@@ -424,13 +434,13 @@ export default {
},
selectAllThing() {
// debugger
this.ruleForm.assetTypeIdList = [];
this.ruleForm.videoContentCatIdListList = [];
if (this.checkedThing) {
this.videoContentCat.map(item => {
this.ruleForm.assetTypeIdList.push(item.id);
this.ruleForm.videoContentCatIdListList.push(item.id);
});
} else {
this.ruleForm.assetTypeIdList = [];
this.ruleForm.videoContentCatIdListList = [];
}
}
}
......
......@@ -2,16 +2,42 @@
<div class="listPage H100">
<div class="search-container">
<el-form :inline="true" :model="form" class="search-form" onsubmit="return false;">
<el-form-item label="版权方名称">
<el-form-item label="">
<el-input
size="mini"
placeholder="请输入版权方名称"
v-model="form.name"
@keyup.enter.native="Search"
clearable
></el-input>
</el-form-item>
<el-form-item label="">
<el-select
placeholder="请选择视频版权方"
@focus="getAssetCopyrightData"
v-model="form.videoContentCopyrightOwnerId"
>
<el-option
v-for="item in copyrightOwner"
:label="item.name"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-select
placeholder="请选择预设视频分类"
@focus="getAssetTypeData"
v-model="form.videoContentCatId"
>
<el-option
v-for="item in videoContentCat"
:label="item.name"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<div class="btn-group">
<el-button size="mini" type="primary" class="btn_form_search" @click="Search">查询</el-button>
......@@ -39,18 +65,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 +75,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">
......@@ -222,6 +235,8 @@ export default {
};
const keyMap ={'TBC':'待初审','REFUSED':'已驳回','TBCA':'待复审','APPROVED_FINAL':'通过'}
return {
copyrightOwner:[],
videoContentCat:[],
keyMap:keyMap,
value1: "",
page: { currentPage: 1, pageSize: 10, total: 0 },
......@@ -269,6 +284,39 @@ export default {
},
components: {},
methods: {
// 获取展板分类列表
getAssetCopyrightData(){
let vm = this;
vm.$https({
url: "copyrightOwner/getList",
method: "get",
authType: this.backToken
},
{copyrightOwnerType:'VIDEO_CONTENT'})
.then(res => {
let data = res.data.data;
this.copyrightOwner = data;
})
.catch(function(err) {
console.log(err);
});
},
// 获取视频分类列表
getAssetTypeData() {
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) {
console.log(err);
});
},
// 渲染父级权限
getPermis() {
let vm = this;
......@@ -338,7 +386,9 @@ export default {
let searchObj = {
_index: 1,
_size: _this.page.pageSize,
name: _this.form.name
name: _this.form.name,
videoContentCatId:_this.form.videoContentCatId,
videoContentCopyrightOwnerId:_this.form.videoContentCopyrightOwnerId
};
this.getTableData(searchObj);
},
......
......@@ -17,10 +17,10 @@
<el-form-item label="版权方名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
<el-form-item label="版权方有效期" required>
<el-form-item label="版权方有效期" prop="value1">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="value1"
v-model="ruleForm.value1"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
......@@ -31,12 +31,12 @@
<span>若没有相应的视频分类,请点击</span>
<el-button type="text" @click="addVideoClass">新建视频分类</el-button>
</el-form-item>
<el-form-item class="selectH100" label="请选择预设视频分类">
<el-form-item class="selectH100" label="请选择视频分类" prop="videoContentCatIdList">
<el-select
placeholder="请选择预设视频分类"
@focus="getAssetTypeData"
multiple
v-model="ruleForm.assetTypeIdList"
v-model="ruleForm.videoContentCatIdList"
@change="getSelectDep"
>
<el-checkbox :style="selfstyle" v-model="checkedThing" @change="selectAllThing">全选</el-checkbox>
......@@ -120,7 +120,7 @@ export default {
},
value1: [],
ruleForm: {
assetTypeIdList: [],
videoContentCatIdList: [],
name: "",
ownerType: "VIDEO_CONTENT"
},
......@@ -146,37 +146,23 @@ export default {
{ required: true, message: "请输入版权方名称", trigger: "blur" }
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
],
date1: [
{
type: "date",
required: true,
message: "请选择日期",
trigger: "change"
}
videoContentCatIdList:[
{required: true, message: "请选择视频分类", trigger: "change" }
],
date2: [
{
type: "date",
required: true,
message: "请选择时间",
trigger: "change"
}
],
type: [
{
type: "array",
required: true,
message: "请至少选择一个活动性质",
trigger: "change"
}
],
resource: [
{ required: true, message: "请选择活动资源", trigger: "change" }
],
desc: [{ required: true, message: "请填写活动形式", trigger: "blur" }]
value1:[
{ required: true, message: "请填写版权方有效期", trigger: "change" }
]
}
};
},
watch:{
// 'ruleForm.value1'(newVal ,oldVal){
// // console.log(newVal,oldVal)
// this.ruleForm.expireDateEnd = this.ruleForm.value1[1];
// this.ruleForm.expireDateStart = this.ruleForm.value1[0];
// }
},
mounted() {
this.init();
},
......@@ -197,12 +183,8 @@ export default {
})
.then(res => {
let data = res.data.data;
// this.videoContentCat = data
this.ruleForm = data;
this.value1 = [data.expireDateStart, data.expireDateEnd];
// this.ruleForm.assetTypeIdList[0] = data.expireDateStart
// this.ruleForm.assetTypeIdList[1] = data.expireDateEnd
this.ruleForm.value1 = [data.expireDateStart, data.expireDateEnd];
})
.catch(function(err) {
console.log(err);
......@@ -213,26 +195,30 @@ export default {
addVideoClass() {
this.dialogVisible = true;
},
// 弹窗保存
// 新建视频分类弹窗保存
save(formName) {
this.$refs[formName].validate(valid => {
this.ruleForm.expireDateEnd = this.value1[1];
this.ruleForm.expireDateStart = this.value1[0];
this.classForm.expireDateEnd = this.value1[1];
this.classForm.expireDateStart = this.value1[0];
if (valid) {
this.$https(
{
url: "videoContentCat/save",
method: "post",
// headers: {
// 'Content-Type': 'application/json'
// },
authType: this.backToken
},
this.classForm
this.$qs.stringify(this.ruleForm)
// this.classForm
)
.then(res => {
this.$message({ type: "success", message: "新增分类成功!" });
console.log(res)
if(res.data.resultCode === "200"){
this.$message({ type: "success", message: "新增分类成功!" });
this.dialogVisible = false;
}else{
this.$message({ type: "error", message: res.data.message });
}
})
.catch(function(err) {
this.$message({
......@@ -258,8 +244,8 @@ export default {
// 新增
submitForm(formName) {
this.$refs[formName].validate(valid => {
this.ruleForm.expireDateEnd = this.value1[1];
this.ruleForm.expireDateStart = this.value1[0];
this.ruleForm.expireDateEnd = this.ruleForm.value1[1];
this.ruleForm.expireDateStart = this.ruleForm.value1[0];
if (valid) {
this.$https(
{
......@@ -271,8 +257,14 @@ export default {
this.$qs.stringify(this.ruleForm)
)
.then(res => {
this.$message({ type: "success", message: "新增成功!" });
history.go(-1);
if(res.resultCode === "200"){
this.$message({ type: "success", message: "新增成功!" });
history.go(-1);
}else{
this.$message({ type: "error", message: res.message });
}
})
.catch(function(err) {
console.log(err);
......@@ -287,8 +279,8 @@ export default {
updateForm(formName) {
this.$refs[formName].validate(valid => {
this.ruleForm.id = this.$route.query.id;
this.ruleForm.expireDateEnd = this.value1[1];
this.ruleForm.expireDateStart = this.value1[0];
this.ruleForm.expireDateEnd = this.ruleForm.value1[1];
this.ruleForm.expireDateStart = this.ruleForm.value1[0];
if (valid) {
this.$https(
......@@ -335,8 +327,8 @@ export default {
console.log(err);
});
},
getSelectDep(assetTypeIdList) {
if (assetTypeIdList.length === this.videoContentCat.length) {
getSelectDep(videoContentCatIdList) {
if (videoContentCatIdList.length === this.videoContentCat.length) {
this.checkedThing = true;
} else {
this.checkedThing = false;
......@@ -344,13 +336,13 @@ export default {
},
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 = [];
}
}
}
......
......@@ -30,7 +30,7 @@
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips">展示所有单位的互动频次统计图及统计表格</span>
<span class="page-tips">可对视频版权方信息进行筛选、修改及删除。可新建版权方信息</span>
</div>
</div>
<div class="table-content">
......
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