Commit d6424196 authored by 乐宝呗666's avatar 乐宝呗666

Merge branch 'master' into dev_fbl

parents 7554804d d89d3de6
...@@ -95,6 +95,7 @@ export default { ...@@ -95,6 +95,7 @@ export default {
type: "success", type: "success",
message: resData.message, message: resData.message,
}); });
localStorage.setItem("userType",resData.user.type)
localStorage.setItem("user", resData.user.userName); localStorage.setItem("user", resData.user.userName);
localStorage.setItem("userId",resData.user.id) localStorage.setItem("userId",resData.user.id)
localStorage.setItem("backToken", resData.token); localStorage.setItem("backToken", resData.token);
......
...@@ -91,8 +91,8 @@ ...@@ -91,8 +91,8 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核" header-align="center" align="center"> <el-table-column label="审核" width="220" header-align="center" align="center">
<template slot-scope="scope" width="220"> <template slot-scope="scope" >
<!-- <div class="table-btn-group"> <!-- <div class="table-btn-group">
<el-tooltip content="通过" placement="top"> <el-tooltip content="通过" placement="top">
......
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核" header-align="center" align="center"> <el-table-column label="审核" width="220" header-align="center" align="center">
<template slot-scope="scope" width="220"> <template slot-scope="scope">
<div class="table-btn-group"> <div class="table-btn-group">
<el-button <el-button
round round
......
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核" header-align="center" align="center"> <el-table-column label="审核" width="220" header-align="center" align="center">
<template slot-scope="scope" width="220"> <template slot-scope="scope">
<div class="table-btn-group"> <div class="table-btn-group">
<el-button <el-button
round round
......
...@@ -114,9 +114,9 @@ export default { ...@@ -114,9 +114,9 @@ export default {
this.$qs.stringify(this.ruleForm) this.$qs.stringify(this.ruleForm)
) )
.then(res => { .then(res => {
if(res.resultCode === "200"){ if(res.data.resultCode === "200"){
this.$message({ type: "success", message: "新成功!" }); this.$message({ type: "success", message: "新建视频版权方成功!" });
history.go(-1); this.dialogVisible = false
}else{ }else{
this.$message({ type: "error", message: res.message }); this.$message({ type: "error", message: res.message });
} }
...@@ -148,12 +148,13 @@ export default { ...@@ -148,12 +148,13 @@ export default {
_this.$qs.stringify(this.ruleForm) _this.$qs.stringify(this.ruleForm)
) )
.then(res => { .then(res => {
if(res.data.resultCode === "200"){ console.log(res)
_this.$message({ type: "success", message: "新增成功!" }); // if(res.data.resultCode === "200"){
_this.dialogVisible =false // _this.$message({ type: "success", message: "新增成功!" });
}else{ // _this.dialogVisible =false
_this.$message({ type: "error", message: res.data.message }); // }else{
} // _this.$message({ type: "error", message: res.data.message });
// }
}) })
......
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
this.filedata.append('file', file.file) this.filedata.append('file', file.file)
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const isLt5M = file.size / 1024 < 1; const isLt5M = file.size / 1024 / 1024 / 1024 < 1;
if (!isLt5M) { if (!isLt5M) {
this.$message.error("上传文件大小不能超过 1GB!"); this.$message.error("上传文件大小不能超过 1GB!");
} }
......
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
this.filedata.append("file", file.file); this.filedata.append("file", file.file);
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const isLt10G = file.size / 1024 < 10; const isLt10G = file.size / 1024 / 1024 / 1024 < 10;
if (!isLt10G) { if (!isLt10G) {
this.$message.error("上传文件大小不能超过 10GB!"); this.$message.error("上传文件大小不能超过 10GB!");
} }
......
...@@ -52,7 +52,6 @@ export default { ...@@ -52,7 +52,6 @@ export default {
console.log(res) console.log(res)
if (resData.resultCode == "200") { if (resData.resultCode == "200") {
// alert("上传成功");
console.log(resData.data.fileList) console.log(resData.data.fileList)
const data = resData.data.fileList const data = resData.data.fileList
console.log(data) console.log(data)
...@@ -76,7 +75,7 @@ export default { ...@@ -76,7 +75,7 @@ export default {
this.filedata.append('file', file.file) this.filedata.append('file', file.file)
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const isLt10G = file.size / 1024 < 10; const isLt10G = file.size / 1024 / 1024 / 1024 < 10;
if (!isLt10G) { if (!isLt10G) {
this.$message.error("上传文件大小不能超过 10GB!"); this.$message.error("上传文件大小不能超过 10GB!");
} }
...@@ -109,9 +108,7 @@ export default { ...@@ -109,9 +108,7 @@ export default {
) )
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.resultCode == 200) { if (resData.resultCode == 200) {
alert("上传成功");
// _this.getOrgTree(); // _this.getOrgTree();
} else { } else {
_this.$message.error(resData.msg || resData.message); _this.$message.error(resData.msg || resData.message);
......
<template> <template>
<div class="info info-add"> <div class="info">
<!-- <div class="info-header">新建展板</div> --> <div class="info-header">{{ type === 'Update'?'修改':'新建'}}展板</div>
<div class="info-container"> <div class="info-container">
<div class="info-wrapper"> <div class="info-wrapper">
<div class="pageTips"> <div class="pageTips">
......
...@@ -90,28 +90,30 @@ ...@@ -90,28 +90,30 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="280" header-align="center" align="center"> <el-table-column label="操作" width="280" header-align="center" align="center">
<!-- 只有下架可编辑、删除,只有通过可上架、下架 -->
<template slot-scope="scope" > <template slot-scope="scope" >
<div class="table-btn-group"> <div class="table-btn-group">
<el-tooltip content="修改" placement="top"> <el-tooltip content="修改" placement="top">
<el-button circle @click="openEdit(scope.row)"> <el-button circle :disabled="scope.row.published" @click="openEdit(scope.row)">
<i class="icon-table icon-edit"></i> <i class="icon-table icon-edit"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button circle :disabled="scope.row.published" @click="handleDelete(scope.row)">
<i class="icon-table icon-del"></i>
</el-button>
</el-tooltip>
<el-tooltip content="上架" placement="top"> <el-tooltip content="上架" placement="top">
<el-button circle :disabled="!!scope.row.published" @click="handlePublish(scope.row,true)"> <el-button circle :disabled="scope.row.auditStatus !== 'APPROVED_FINAL'" v-show="!scope.row.published" @click="handlePublish(scope.row,true)">
<i class="icon-table icon-enable"></i> <i class="icon-table icon-enable"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="下架" placement="top"> <el-tooltip content="下架" placement="top">
<el-button circle :disabled="!scope.row.published" @click="handlePublish(scope.row,false)"> <el-button circle :disabled="scope.row.auditStatus !== 'APPROVED_FINAL'" v-show="scope.row.published" @click="handlePublish(scope.row,false)">
<i class="icon-table icon-disable"></i> <i class="icon-table icon-disable"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button circle @click="handleDelete(scope.row)">
<i class="icon-table icon-del"></i>
</el-button>
</el-tooltip>
<el-tooltip content="详情" placement="top"> <el-tooltip content="详情" placement="top">
<el-button circle @click="displayInfo(scope.row)"> <el-button circle @click="displayInfo(scope.row)">
<i class="icon-table icon-detail"></i> <i class="icon-table icon-detail"></i>
...@@ -284,6 +286,7 @@ export default { ...@@ -284,6 +286,7 @@ export default {
}, },
// 上下架 // 上下架
handlePublish(row ,isPublish) { handlePublish(row ,isPublish) {
let _isPublish = isPublish
let _this = this; let _this = this;
_this _this
.$https({ .$https({
...@@ -294,10 +297,23 @@ export default { ...@@ -294,10 +297,23 @@ export default {
_this.$qs.stringify({isPublish:isPublish})) _this.$qs.stringify({isPublish:isPublish}))
.then( .then(
res => { res => {
_this.msgInfo = { // _this.msgInfo = {
type: "wait", // type: "wait",
des: `申请已提交,待审核…`, // des: `申请已提交,待审核…`,
}; // };
if(res.data.resultCode === "200"){
if(_isPublish){
this.$message({ type: "success", message: "上架申请已提交,待审核!" });
}else{
this.$message({ type: "success", message: "下架申请已提交,待审核!" });
}
_this.Search();
}else{
this.$message({ type: "error", message: res.data.message });
}
_this.onSearch(); _this.onSearch();
}, },
error => { error => {
......
<template> <template>
<div class="info"> <div class="info">
<video-dialog ref="videoDialog"></video-dialog> <video-dialog ref="videoDialog"></video-dialog>
<div class="info-header">新建学习内容</div> <!-- <div class="info-header">新建学习内容</div> -->
<div class="info-header">{{ type === 'Update'?'修改':'新建'}}学习内容</div>
<div class="info-container"> <div class="info-container">
<div class="info-wrapper"> <div class="info-wrapper">
<el-form <el-form
...@@ -13,27 +14,18 @@ ...@@ -13,27 +14,18 @@
:inline="true" :inline="true"
label-position="top" label-position="top"
> >
<el-form-item <el-form-item label="学习内容名称" prop="name" class="w50" style="padding-right: 100px">
label="学习内容名称"
prop="name"
class="w50"
style="padding-right: 100px"
>
<el-input v-model="ruleForm.name"></el-input> <el-input v-model="ruleForm.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="适用范围"> <el-form-item label="适用范围">
<!-- ALL_PLAT,THIS_ORGAN,THIS_ORGAN_SUB --> <span v-show="userType === '1'">全平台</span>
全平台 <el-radio-group v-show="userType === '2'" v-model="ruleForm.applicableScope">
<el-radio label="THIS_ORGAN">仅本单位</el-radio>
<el-radio label="THIS_ORGAN_SUB">本单位及下属单位</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="所属学习项目" class="w50" prop="learningProjectId">
label="所属学习项目" <el-select placeholder="请选所属学习项目" v-model="ruleForm.learningProjectId">
class="w50"
prop="learningProjectId"
>
<el-select
placeholder="请选所属学习项目"
v-model="ruleForm.learningProjectId"
>
<el-option <el-option
v-for="item in learningProjectIdList" v-for="item in learningProjectIdList"
:label="item.name" :label="item.name"
...@@ -45,23 +37,14 @@ ...@@ -45,23 +37,14 @@
<el-form-item label="学习内容宣传图" prop="cover" class="w100"> <el-form-item label="学习内容宣传图" prop="cover" class="w100">
<upload-img ref="uploadImg" @imgUrl="imgUrl"></upload-img> <upload-img ref="uploadImg" @imgUrl="imgUrl"></upload-img>
</el-form-item> </el-form-item>
<el-form-item <el-form-item class="w50" label="展板类别" prop="exhibitionBoardCatIdList">
class="w50"
label="展板类别"
prop="exhibitionBoardCatIdList"
>
<el-select <el-select
placeholder="请选择展板类别" placeholder="请选择展板类别"
multiple multiple
v-model="ruleForm.exhibitionBoardCatIdList" v-model="ruleForm.exhibitionBoardCatIdList"
@change="getSelectDep" @change="getSelectDep"
> >
<el-checkbox <el-checkbox :style="selfstyle" v-model="checkedThing" @change="selectAllThing">全选</el-checkbox>
:style="selfstyle"
v-model="checkedThing"
@change="selectAllThing"
>全选</el-checkbox
>
<el-option <el-option
v-for="item in videoContentCat" v-for="item in videoContentCat"
:label="item.name" :label="item.name"
...@@ -77,12 +60,7 @@ ...@@ -77,12 +60,7 @@
v-model="ruleForm.copyrightOwnerIdList" v-model="ruleForm.copyrightOwnerIdList"
@change="getSelectDep2" @change="getSelectDep2"
> >
<el-checkbox <el-checkbox :style="selfstyle" v-model="checkedThing2" @change="selectAllThing2">全选</el-checkbox>
:style="selfstyle"
v-model="checkedThing2"
@change="selectAllThing2"
>全选</el-checkbox
>
<el-option <el-option
v-for="item in assetType2" v-for="item in assetType2"
:label="item.name" :label="item.name"
...@@ -91,11 +69,8 @@ ...@@ -91,11 +69,8 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="展板备选清单" class="w100" prop="exhibitionBoardIdList">
label="展板备选清单" <div class="party-table">
class="w100"
prop="exhibitionBoardIdList"
>
<el-table <el-table
border border
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
...@@ -105,29 +80,26 @@ ...@@ -105,29 +80,26 @@
:data="tableData" :data="tableData"
> >
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column <el-table-column type="index" width="120" label="序号"></el-table-column>
type="index" <el-table-column show-overflow-tooltip label="版权方名称" prop="name"></el-table-column>
width="120" <el-table-column show-overflow-tooltip label="展板类别" prop="exhibitionBoardCatName"></el-table-column>
label="序号" <el-table-column show-overflow-tooltip label="展板版权方" prop="boardCopyrightOwnerName"></el-table-column>
></el-table-column>
<el-table-column
show-overflow-tooltip
label="版权方名称"
prop="name"
></el-table-column>
<el-table-column
show-overflow-tooltip
label="展板类别"
prop="exhibitionBoardCatName"
></el-table-column>
<el-table-column
show-overflow-tooltip
label="展板版权方"
prop="boardCopyrightOwnerName"
></el-table-column>
<el-table-column label="操作" width="180"> <el-table-column label="操作" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <div class="table-btn-group">
<el-tooltip content="视频预览" placement="top">
<el-button circle @click="videoPreview(scope.row)">
<i class="icon-table icon-video"></i>
</el-button>
</el-tooltip>
<el-tooltip content="展板预览" placement="top">
<el-button circle @click="displayPreview(scope.row)">
<i class="icon-table icon-board"></i>
</el-button>
</el-tooltip>
</div>
<!-- <el-button
type="text" type="text"
style="padding: 0" style="padding: 0"
@click="videoPreview(scope.row)" @click="videoPreview(scope.row)"
...@@ -138,12 +110,15 @@ ...@@ -138,12 +110,15 @@
style="padding: 0" style="padding: 0"
@click="displayPreview(scope.row)" @click="displayPreview(scope.row)"
>展板预览</el-button >展板预览</el-button
> >-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!--新增弹框--> <!--新增弹框-->
<el-dialog <el-dialog
custom-class="party-dialog" custom-class="party-dialog"
...@@ -166,26 +141,16 @@ ...@@ -166,26 +141,16 @@
<el-input v-model="classForm.name" readonly></el-input> <el-input v-model="classForm.name" readonly></el-input>
</el-form-item> </el-form-item>
<el-form-item label="版权方"> <el-form-item label="版权方">
<el-input <el-input v-model="classForm.boardCopyrightOwnerName" readonly></el-input>
v-model="classForm.boardCopyrightOwnerName"
readonly
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="展板分类"> <el-form-item label="展板分类">
<el-input <el-input v-model="classForm.exhibitionBoardCatName" readonly></el-input>
v-model="classForm.exhibitionBoardCatName"
readonly
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="展板宣传图"> <el-form-item label="展板宣传图">
<img class="imgSize" :src="classForm.cover" alt="" /> <img class="imgSize" :src="classForm.cover" alt />
</el-form-item> </el-form-item>
<el-form-item label="简介"> <el-form-item label="简介">
<el-input <el-input type="textarea" v-model="classForm.remarks" readonly></el-input>
type="textarea"
v-model="classForm.remarks"
readonly
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -195,25 +160,22 @@ ...@@ -195,25 +160,22 @@
<div class="info-footer"> <div class="info-footer">
<div class="btn-group"> <div class="btn-group">
<!-- 确定、取消 --> <!-- 确定、取消 -->
<el-button <el-button
v-show="type === 'add'" v-show="type === 'add'"
size="mini" size="mini"
type="primary" type="primary"
class="btn_form_search" class="btn_form_search"
@click="submitForm('ruleForm')" @click="submitForm('ruleForm')"
>提交审核</el-button >提交审核</el-button>
>
<el-button <el-button
v-show="type === 'Update'" v-show="type === 'Update'"
size="mini" size="mini"
type="primary" type="primary"
class="btn_form_search" class="btn_form_search"
@click="updateForm('ruleForm')" @click="updateForm('ruleForm')"
>提交审核</el-button >提交审核</el-button>
> <el-button size="mini" class="btn_form_search" @click="close">取消</el-button>
<el-button size="mini" class="btn_form_search" @click="close"
>取消</el-button
>
</div> </div>
</div> </div>
</div> </div>
...@@ -227,7 +189,7 @@ export default { ...@@ -227,7 +189,7 @@ export default {
components: { components: {
uploadImg, uploadImg,
videoDialog, videoDialog,
audioPlay, audioPlay
}, },
data() { data() {
return { return {
...@@ -242,7 +204,7 @@ export default { ...@@ -242,7 +204,7 @@ export default {
selfstyle: { selfstyle: {
textAlign: "right", textAlign: "right",
width: "100%", width: "100%",
paddingRight: "10px", paddingRight: "10px"
}, },
tableData: [], tableData: [],
ruleForm: { ruleForm: {
...@@ -252,50 +214,52 @@ export default { ...@@ -252,50 +214,52 @@ export default {
learningProjectId: "", //所属学习项目 learningProjectId: "", //所属学习项目
exhibitionBoardCatIdList: [], //展板类别 exhibitionBoardCatIdList: [], //展板类别
copyrightOwnerIdList: [], //版权方 copyrightOwnerIdList: [], //版权方
exhibitionBoardIdList: [], // 展板备选 exhibitionBoardIdList: [] // 展板备选
}, },
rules: { rules: {
name: [ name: [
{ required: true, message: "请输入学习内容名称", trigger: "blur" }, { required: true, message: "请输入学习内容名称", trigger: "blur" }
], ],
cover: [ cover: [
{ {
required: true, required: true,
message: "请选择学习内容宣传图", message: "请选择学习内容宣传图"
}, }
], ],
learningProjectId: [ learningProjectId: [
{ required: true, message: "请选择所属学习项目", trigger: "change" }, { required: true, message: "请选择所属学习项目", trigger: "change" }
], ],
exhibitionBoardCatIdList: [ exhibitionBoardCatIdList: [
{ {
required: true, required: true,
type: "array", type: "array",
message: "请选择展板类别", message: "请选择展板类别",
trigger: "change", trigger: "change"
}, }
], ],
copyrightOwnerIdList: [ copyrightOwnerIdList: [
{ {
required: true, required: true,
type: "array", type: "array",
message: "请选择版权方", message: "请选择版权方",
trigger: "change", trigger: "change"
}, }
], ],
exhibitionBoardIdList: [ exhibitionBoardIdList: [
{ {
required: true, required: true,
type: "array", type: "array",
message: "请选择展板", message: "请选择展板",
trigger: "change", trigger: "change"
}, }
], ]
}, },
multipleSelection: [], multipleSelection: [],
userType: ""
}; };
}, },
mounted() { mounted() {
this.userType = localStorage.getItem("userType");
this.init(); this.init();
}, },
methods: { methods: {
...@@ -329,9 +293,9 @@ export default { ...@@ -329,9 +293,9 @@ export default {
vm.$https({ vm.$https({
url: "learningContent/get/" + id, url: "learningContent/get/" + id,
method: "get", method: "get",
authType: this.backToken, authType: this.backToken
}) })
.then((res) => { .then(res => {
let data = res.data.data; let data = res.data.data;
this.ruleForm = data; this.ruleForm = data;
this.ruleForm = { this.ruleForm = {
...@@ -342,21 +306,21 @@ export default { ...@@ -342,21 +306,21 @@ export default {
learningProjectId: data.learningProjectId, learningProjectId: data.learningProjectId,
exhibitionBoardCatIdList: data.exhibitionBoardCatIdList, exhibitionBoardCatIdList: data.exhibitionBoardCatIdList,
id: data.id, id: data.id,
exhibitionBoardIdList: data.exhibitionBoardIdList, exhibitionBoardIdList: data.exhibitionBoardIdList
}; };
// this.tableData = data.exhibitionBoardList; // this.tableData = data.exhibitionBoardList;
this.multipleSelection = data.exhibitionBoardList; this.multipleSelection = data.exhibitionBoardList;
this.$refs.uploadImg.showImg(this.ruleForm.cover); this.$refs.uploadImg.showImg(this.ruleForm.cover);
this.getExhibitionBoardTable(); this.getExhibitionBoardTable();
}) })
.catch(function (err) { .catch(function(err) {
console.log(err); console.log(err);
}); });
}, },
getExhibitionBoardTable() { getExhibitionBoardTable() {
const param = { const param = {
boardCopyrightOwnerIdList: this.ruleForm.copyrightOwnerIdList, boardCopyrightOwnerIdList: this.ruleForm.copyrightOwnerIdList,
exhibitionBoardCatIdList: this.ruleForm.exhibitionBoardCatIdList, exhibitionBoardCatIdList: this.ruleForm.exhibitionBoardCatIdList
}; };
this.getTableData(param, "update"); this.getTableData(param, "update");
}, },
...@@ -367,8 +331,8 @@ export default { ...@@ -367,8 +331,8 @@ export default {
let _this = this; let _this = this;
let tableData = this.tableData; let tableData = this.tableData;
let multipleSelection = this.multipleSelection; let multipleSelection = this.multipleSelection;
tableData.forEach((v) => { tableData.forEach(v => {
multipleSelection.forEach((m) => { multipleSelection.forEach(m => {
if (v.id == m.id) { if (v.id == m.id) {
_this.$refs.multipleTable.toggleRowSelection(v); _this.$refs.multipleTable.toggleRowSelection(v);
} }
...@@ -381,13 +345,13 @@ export default { ...@@ -381,13 +345,13 @@ export default {
vm.$https({ vm.$https({
url: "exhibitionBoardCat/getList", url: "exhibitionBoardCat/getList",
method: "get", method: "get",
authType: this.backToken, authType: this.backToken
}) })
.then((res) => { .then(res => {
let data = res.data.data; let data = res.data.data;
vm.videoContentCat = data; vm.videoContentCat = data;
}) })
.catch(function (err) { .catch(function(err) {
console.log(err); console.log(err);
}); });
}, },
...@@ -398,15 +362,15 @@ export default { ...@@ -398,15 +362,15 @@ export default {
{ {
url: "copyrightOwner/getList", url: "copyrightOwner/getList",
method: "get", method: "get",
authType: this.backToken, authType: this.backToken
}, },
{ copyrightOwnerType: "EXHIBITION_BOARD" } { copyrightOwnerType: "EXHIBITION_BOARD" }
) )
.then((res) => { .then(res => {
let data = res.data.data; let data = res.data.data;
vm.assetType2 = data; vm.assetType2 = data;
}) })
.catch(function (err) { .catch(function(err) {
console.log(err); console.log(err);
}); });
}, },
...@@ -416,13 +380,13 @@ export default { ...@@ -416,13 +380,13 @@ export default {
vm.$https({ vm.$https({
url: "learningProject/getList", url: "learningProject/getList",
method: "get", method: "get",
authType: this.backToken, authType: this.backToken
}) })
.then((res) => { .then(res => {
let data = res.data.data; let data = res.data.data;
vm.learningProjectIdList = data; vm.learningProjectIdList = data;
}) })
.catch(function (err) { .catch(function(err) {
console.log(err); console.log(err);
}); });
}, },
...@@ -433,45 +397,45 @@ export default { ...@@ -433,45 +397,45 @@ export default {
{ {
url: "learningContentBoard/getList", url: "learningContentBoard/getList",
method: "get", method: "get",
authType: this.backToken, authType: this.backToken
}, },
{ learningContentId: this.$route.query.id } { learningContentId: this.$route.query.id }
) )
.then((res) => { .then(res => {
let data = res.data.data; let data = res.data.data;
console.log(data); console.log(data);
}) })
.catch(function (err) { .catch(function(err) {
console.log(err); console.log(err);
}); });
}, },
// 多选赋值 // 多选赋值
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
let newArray = val.map((item) => { let newArray = val.map(item => {
return item.id; return item.id;
}); });
this.ruleForm.exhibitionBoardIdList = newArray; this.ruleForm.exhibitionBoardIdList = newArray;
}, },
// 新增 // 新增
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate(valid => {
console.log(this.ruleForm); console.log(this.ruleForm);
if (valid) { if (valid) {
this.$https( this.$https(
{ {
url: "/learningContent/save", url: "/learningContent/save",
method: "post", method: "post",
authType: this.backToken, authType: this.backToken
}, },
// this.ruleForm // this.ruleForm
this.$qs.stringify(this.ruleForm) this.$qs.stringify(this.ruleForm)
) )
.then((res) => { .then(res => {
this.$message({ type: "success", message: "新增成功!" }); this.$message({ type: "success", message: "新增成功!" });
history.go(-1); history.go(-1);
}) })
.catch(function (err) { .catch(function(err) {
console.log(err); console.log(err);
}); });
} else { } else {
...@@ -482,22 +446,22 @@ export default { ...@@ -482,22 +446,22 @@ export default {
}, },
// 修改版权方 // 修改版权方
updateForm(formName) { updateForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
this.$https( this.$https(
{ {
url: "learningContent/update", url: "learningContent/update",
method: "put", method: "put",
authType: this.backToken, authType: this.backToken
}, },
this.$qs.stringify(this.ruleForm) this.$qs.stringify(this.ruleForm)
// this.ruleForm // this.ruleForm
) )
.then((res) => { .then(res => {
this.$message({ type: "success", message: "修改成功!" }); this.$message({ type: "success", message: "修改成功!" });
history.go(-1); history.go(-1);
}) })
.catch(function (err) { .catch(function(err) {
console.log(err); console.log(err);
}); });
} else { } else {
...@@ -527,7 +491,7 @@ export default { ...@@ -527,7 +491,7 @@ export default {
} }
const param = { const param = {
boardCopyrightOwnerIdList: this.ruleForm.copyrightOwnerIdList, boardCopyrightOwnerIdList: this.ruleForm.copyrightOwnerIdList,
exhibitionBoardCatIdList: this.ruleForm.exhibitionBoardCatIdList, exhibitionBoardCatIdList: this.ruleForm.exhibitionBoardCatIdList
}; };
this.getTableData(param); this.getTableData(param);
}, },
...@@ -538,11 +502,11 @@ export default { ...@@ -538,11 +502,11 @@ export default {
{ {
url: "exhibitionBoard/getList", url: "exhibitionBoard/getList",
method: "get", method: "get",
authType: this.backToken, authType: this.backToken
}, },
vm.$qs.stringify(param) vm.$qs.stringify(param)
) )
.then((res) => { .then(res => {
let data = res.data.data; let data = res.data.data;
vm.tableData = data; vm.tableData = data;
if (type) { if (type) {
...@@ -552,7 +516,7 @@ export default { ...@@ -552,7 +516,7 @@ export default {
}, 1000); }, 1000);
} }
}) })
.catch(function (err) { .catch(function(err) {
console.log(err); console.log(err);
}); });
}, },
...@@ -561,7 +525,7 @@ export default { ...@@ -561,7 +525,7 @@ export default {
// debugger // debugger
this.ruleForm.exhibitionBoardCatIdList = []; this.ruleForm.exhibitionBoardCatIdList = [];
if (this.checkedThing) { if (this.checkedThing) {
this.videoContentCat.map((item) => { this.videoContentCat.map(item => {
this.ruleForm.exhibitionBoardCatIdList.push(item.id); this.ruleForm.exhibitionBoardCatIdList.push(item.id);
}); });
} else { } else {
...@@ -572,7 +536,7 @@ export default { ...@@ -572,7 +536,7 @@ export default {
// debugger // debugger
this.ruleForm.copyrightOwnerIdList = []; this.ruleForm.copyrightOwnerIdList = [];
if (this.checkedThing2) { if (this.checkedThing2) {
this.assetType2.map((item) => { this.assetType2.map(item => {
this.ruleForm.copyrightOwnerIdList.push(item.id); this.ruleForm.copyrightOwnerIdList.push(item.id);
}); });
} else { } else {
...@@ -596,7 +560,7 @@ export default { ...@@ -596,7 +560,7 @@ export default {
} else { } else {
this.$message({ this.$message({
message: "已经是第一条,上移失败", message: "已经是第一条,上移失败",
type: "warning", type: "warning"
}); });
} }
}, },
...@@ -604,17 +568,18 @@ export default { ...@@ -604,17 +568,18 @@ export default {
if (index + 1 == this.tableData.length) { if (index + 1 == this.tableData.length) {
this.$message({ this.$message({
message: "已经是最后一条,下移失败", message: "已经是最后一条,下移失败",
type: "warning", type: "warning"
}); });
} else { } else {
let downData = this.tableData[index + 1]; let downData = this.tableData[index + 1];
this.tableData.splice(index + 1, 1); this.tableData.splice(index + 1, 1);
this.tableData.splice(index, 0, downData); this.tableData.splice(index, 0, downData);
} }
}, }
}, }
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../../style/table.less";
</style> </style>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-form-item> <el-form-item>
<el-input <el-input
placeholder="请输入学习内容名称" placeholder="请输入学习内容名称"
v-model="form.name" v-model="form.nameOrCode"
@keyup.enter.native="Search" @keyup.enter.native="Search"
clearable clearable
></el-input> ></el-input>
...@@ -57,7 +57,30 @@ ...@@ -57,7 +57,30 @@
show-overflow-tooltip show-overflow-tooltip
label="学习内容名称" label="学习内容名称"
prop="name" prop="name"
></el-table-column> >
<template slot-scope="scope">
<div class="table-btn-group">
<el-tooltip content="上移" placement="top">
<el-button circle :disabled="scope.$index == 0"
@click="moveUpward(scope.row, scope.$index)" >
<i class="icon-table-up icon-up"></i>
</el-button>
</el-tooltip>
<el-tooltip content="下移" placement="top">
<el-button circle
:disabled="(scope.$index + 1) == tableData.length"
@click="moveDown(scope.row, scope.$index)">
<i class="icon-table-up icon-down"></i>
</el-button>
</el-tooltip>
<span>&nbsp;&nbsp;</span>
<span>{{scope.row.name}}</span>
</div>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"></el-table-column> <el-table-column label="创建时间" prop="createTime"></el-table-column>
<el-table-column label="创建者" prop=""></el-table-column> <el-table-column label="创建者" prop=""></el-table-column>
<el-table-column <el-table-column
...@@ -79,8 +102,9 @@ ...@@ -79,8 +102,9 @@
</el-table-column> </el-table-column>
<el-table-column label="使用状态" prop="published"> <el-table-column label="使用状态" prop="published">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.published">禁用</span> <!-- {{scope.row.published}} -->
<span v-else>启用</span> <span v-if="scope.row.published">启用</span>
<span v-else>禁用</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -91,6 +115,19 @@ ...@@ -91,6 +115,19 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="table-btn-group"> <div class="table-btn-group">
<!-- <el-tooltip content="上移" placement="top">
<el-button circle :disabled="scope.$index == 0"
@click="moveUpward(scope.row, scope.$index)" >
<i class="icon-table-up icon-up"></i>
</el-button>
</el-tooltip>
<el-tooltip content="下移" placement="top">
<el-button circle
:disabled="(scope.$index + 1) == tableData.length"
@click="moveDown(scope.row, scope.$index)">
<i class="icon-table-up icon-down"></i>
</el-button>
</el-tooltip> -->
<el-tooltip content="修改" placement="top"> <el-tooltip content="修改" placement="top">
<el-button circle @click="openEdit(scope.row)"> <el-button circle @click="openEdit(scope.row)">
<i class="icon-table icon-edit"></i> <i class="icon-table icon-edit"></i>
...@@ -102,16 +139,17 @@ ...@@ -102,16 +139,17 @@
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="启用" placement="top"> <el-tooltip content="启用" placement="top">
<el-button circle @click="handlePublish(scope.row, 'True')"> <el-button circle v-show="!scope.row.published" @click="handlePublish(scope.row, 'True')">
<i class="icon-table icon-enable"></i> <i class="icon-table icon-enable"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip content="禁用" placement="top"> <el-tooltip content="禁用" placement="top">
<el-button circle @click="handlePublish(scope.row, 'False')"> <el-button circle v-show="scope.row.published" @click="handlePublish(scope.row, 'False')">
<i class="icon-table icon-disable"></i> <i class="icon-table icon-disable"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-button
<!-- <el-button
type="text" type="text"
style="padding:0" style="padding:0"
:disabled="scope.$index == 0" :disabled="scope.$index == 0"
...@@ -122,12 +160,7 @@ ...@@ -122,12 +160,7 @@
style="padding:0" style="padding:0"
:disabled="(scope.$index + 1) == tableData.length" :disabled="(scope.$index + 1) == tableData.length"
@click="moveDown(scope.row, scope.$index)" @click="moveDown(scope.row, scope.$index)"
>下移</el-button> >下移</el-button> -->
<!-- <el-tooltip content="删除" placement="top">
<el-button circle @click="handleDelete(scope.row)">
<i class="icon-table icon-del"></i>
</el-button>
</el-tooltip> -->
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -369,7 +402,7 @@ export default { ...@@ -369,7 +402,7 @@ export default {
let searchObj = { let searchObj = {
_index: 1, _index: 1,
_size: _this.page.pageSize, _size: _this.page.pageSize,
name: _this.form.name, nameOrCode: _this.form.nameOrCode,
startDate: this.value1 ? this.value1[0] : "", startDate: this.value1 ? this.value1[0] : "",
endDate: this.value1 ? this.value1[1] : "", endDate: this.value1 ? this.value1[1] : "",
}; };
......
<template> <template>
<div class="info"> <div class="info">
<div class="info-header">新建视频</div> <div class="info-header">{{ type === 'Update'?'修改':'新建'}}视频</div>
<div class="info-container"> <div class="info-container">
<div class="info-wrapper"> <div class="info-wrapper">
<div class="pageTips"> <div class="pageTips">
...@@ -199,7 +199,7 @@ export default { ...@@ -199,7 +199,7 @@ export default {
}, },
rules: { rules: {
name: [ name: [
{ required: true, message: "请输入版权方名称", trigger: "blur" } { required: true, message: "请输入视频名称", trigger: "blur" }
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" } // { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
], ],
videoContentCopyrightOwnerId:[ videoContentCopyrightOwnerId:[
...@@ -277,7 +277,7 @@ export default { ...@@ -277,7 +277,7 @@ export default {
addVideoClass() { addVideoClass() {
this.dialogVisible = true; this.dialogVisible = true;
}, },
// 弹窗保存 // 新建视频分类弹窗保存
save(formName) { save(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
this.ruleForm.expireDateEnd = this.value1[1]; this.ruleForm.expireDateEnd = this.value1[1];
...@@ -289,10 +289,14 @@ export default { ...@@ -289,10 +289,14 @@ export default {
method: "post", method: "post",
authType: this.backToken authType: this.backToken
}, },
this.classForm this.$qs.stringify(this.classForm)
).then(res => { ).then(res => {
if(res.data.resultCode === "200"){
this.$message({ type: "success", message: "新增分类成功!" }); this.$message({ type: "success", message: "新增分类成功!" });
this.dialogVisible = false; this.dialogVisible = false;
}else{
this.$message({ type: "error", message: res.data.message });
}
}).catch(function(err) { }).catch(function(err) {
this.$message({ this.$message({
type: "fail", type: "fail",
......
...@@ -75,8 +75,8 @@ ...@@ -75,8 +75,8 @@
<span v-else-if="scope.row.auditStatus === 'APPROVED_FINAL'">通过</span> <span v-else-if="scope.row.auditStatus === 'APPROVED_FINAL'">通过</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" header-align="center" align="center"> <el-table-column label="操作" header-align="center" width="220" align="center">
<template slot-scope="scope" width="220"> <template slot-scope="scope" >
<div class="table-btn-group"> <div class="table-btn-group">
<el-tooltip content="修改" placement="top"> <el-tooltip content="修改" placement="top">
<el-button circle @click="openEdit(scope.row)"> <el-button circle @click="openEdit(scope.row)">
......
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
) )
.then(res => { .then(res => {
if(res.data.resultCode === "200"){ if(res.data.resultCode === "200"){
this.$message({ type: "success", message: "新增视频版权方申请已提交,待审核!" }); this.$message({ type: "success", message: "新增视频版权成功!" });
history.go(-1); history.go(-1);
}else{ }else{
this.$message({ type: "error", message: res.data.message }); this.$message({ type: "error", message: res.data.message });
...@@ -294,7 +294,7 @@ export default { ...@@ -294,7 +294,7 @@ export default {
) )
.then(res => { .then(res => {
if(res.data.resultCode === "200"){ if(res.data.resultCode === "200"){
this.$message({ type: "success", message: "修改视频版权方申请已提交,待审核!" }); this.$message({ type: "success", message: "修改视频版权方成功!" });
history.go(-1); history.go(-1);
}else{ }else{
this.$message({ type: "error", message: res.data.message }); this.$message({ type: "error", message: res.data.message });
......
...@@ -550,6 +550,18 @@ ...@@ -550,6 +550,18 @@
.icon-disable { .icon-disable {
background-image: url("~@/assets/icons/disable.png"); background-image: url("~@/assets/icons/disable.png");
} }
.icon-up{
background-image: url("~@/assets/icons/up.png");
}
.icon-down{
background-image: url("~@/assets/icons/down.png");
}
.icon-video{
background-image: url("~@/assets/icons/video.png");
}
.icon-board{
background-image: url("~@/assets/icons/board.png");
}
.icon-del { .icon-del {
background-image: url("~@/assets/icons/del.png"); background-image: url("~@/assets/icons/del.png");
......
...@@ -40,6 +40,14 @@ ...@@ -40,6 +40,14 @@
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
} }
.icon-table-up{
display: inline-block;
width: 12px;
height: 24px;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.passed, .passed,
......
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