Commit 828a2b6d authored by Your Name's avatar Your Name

展板版权方、内容管理删除提示

parent 6508bf10
...@@ -357,8 +357,12 @@ export default { ...@@ -357,8 +357,12 @@ export default {
}) })
.then( .then(
(res) => { (res) => {
this.$message({ type: "success", message: "删除成功!" }); if(res.data.resultCode === "200"){
_this.onSearch(); this.$message({ type: "success", message: "删除成功!" });
_this.onSearch();
}else{
this.$message({ type: "error", message: res.data.message });
}
}, },
(error) => { (error) => {
this.$message({ this.$message({
......
<template> <template>
<div class="listPage H100"> <div class="listPage H100">
<div class="search-container"> <div class="search-container">
<el-form :inline="true" :model="form" onsubmit="return false;"> <el-form :inline="true" :model="form" onsubmit="return false;">
<el-form-item > <el-form-item >
<el-input <el-input
placeholder="请输入版权方名称" placeholder="请输入版权方名称"
v-model="form.nameOrCode" v-model="form.nameOrCode"
@keyup.enter.native="Search" @keyup.enter.native="Search"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item > <el-form-item >
<el-date-picker <el-date-picker
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
v-model="value1" v-model="value1"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div class="btn-group"> <div class="btn-group">
<el-button type="primary" @click="Search">查询</el-button> <el-button type="primary" @click="Search">查询</el-button>
<el-button @click="Reset">重置</el-button> <el-button @click="Reset">重置</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="page-tip"> <div class="page-tip">
<span class="page-tip-title">页面说明:</span> <span class="page-tip-title">页面说明:</span>
<span class="page-tips">可对视频版权方信息进行筛选、修改及删除。可新建版权方信息</span> <span class="page-tips">可对视频版权方信息进行筛选、修改及删除。可新建版权方信息</span>
</div> </div>
</div> </div>
<div class="table-content"> <div class="table-content">
<div class="btn-group"> <div class="btn-group">
<el-button type="primary" @click="addPermis()">新建版权方</el-button> <el-button type="primary" @click="addPermis()">新建版权方</el-button>
</div> </div>
<div class="party-table"> <div class="party-table">
<el-table <el-table
border border
style="width: 100%;height:100%" style="width: 100%;height:100%"
height="100%" height="100%"
ref="multipleTable" ref="multipleTable"
:data="tableData" :data="tableData"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="index" width="120" label="序号"> <el-table-column type="index" width="120" label="序号">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ (page.currentPage - 1) * 10 + scope.$index + 1 }}</span> <span>{{ (page.currentPage - 1) * 10 + scope.$index + 1 }}</span>
</template> </template>
</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="name"></el-table-column>
<el-table-column show-overflow-tooltip label="视频分类" prop="videoContentCatNames"></el-table-column> <el-table-column show-overflow-tooltip label="视频分类" prop="videoContentCatNames"></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="expireDateEnd" width="200"> <el-table-column label="版权方有效期" prop="expireDateEnd" width="200">
<template slot-scope="scope">{{scope.row.expireDateStart}}{{scope.row.expireDateEnd}}</template> <template slot-scope="scope">{{scope.row.expireDateStart}}{{scope.row.expireDateEnd}}</template>
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip label="备注" prop="remarks"></el-table-column> <el-table-column show-overflow-tooltip label="备注" prop="remarks"></el-table-column>
<el-table-column label="操作" header-align="center" align="center"> <el-table-column label="操作" header-align="center" align="center">
<template slot-scope="scope" width="220"> <template slot-scope="scope" width="220">
<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)">
<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-tooltip content="删除" placement="top">
<el-button circle @click="handleDelete(scope.row)"> <el-button circle @click="handleDelete(scope.row)">
<i class="icon-table icon-del"></i> <i class="icon-table icon-del"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="partyt-pagination"> <div class="partyt-pagination">
<el-pagination <el-pagination
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page.currentPage" :current-page="page.currentPage"
:page-size="page.pageSize" :page-size="page.pageSize"
layout="prev, pager, next, jumper" layout="prev, pager, next, jumper"
:total="page.total" :total="page.total"
></el-pagination> ></el-pagination>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
var checkIsNull = (rule, value, callback) => { var checkIsNull = (rule, value, callback) => {
if (value) { if (value) {
if (value.trim() == "") { if (value.trim() == "") {
callback(new Error("不允许只输入空格")); callback(new Error("不允许只输入空格"));
} else { } else {
callback(); callback();
} }
} }
}; };
return { return {
value1: "", value1: "",
page: { currentPage: 1, pageSize: 10, total: 0 }, page: { currentPage: 1, pageSize: 10, total: 0 },
tableData: [], tableData: [],
FormVisible: false, FormVisible: false,
FormVisible1: false, FormVisible1: false,
formLabelWidth: "100px", formLabelWidth: "100px",
form: { form: {
nameOrCode: "", nameOrCode: "",
ownerType: "VIDEO_CONTENT" ownerType: "VIDEO_CONTENT"
}, },
editform: { editform: {
menuName: "", menuName: "",
menuUrl: "", menuUrl: "",
parentId: "", parentId: "",
sort: "", sort: "",
id: "" id: ""
}, },
permisform: { permisform: {
menuName: "", menuName: "",
menuUrl: "", menuUrl: "",
parentId: "", parentId: "",
sort: "" sort: ""
}, },
typeList: [], typeList: [],
rules: { rules: {
sort: [ sort: [
{ required: true, message: "请输入顺序值", trigger: "change" }, { required: true, message: "请输入顺序值", trigger: "change" },
{ pattern: /^(\d{1,5})?$/, message: "排序值为低于5位数的纯数字" } { pattern: /^(\d{1,5})?$/, message: "排序值为低于5位数的纯数字" }
], ],
menuName: [ menuName: [
{ required: true, message: "请输入菜单名称", trigger: "change" }, { required: true, message: "请输入菜单名称", trigger: "change" },
{ max: 20, message: "不能超过20个字符", trigger: "change" }, { max: 20, message: "不能超过20个字符", trigger: "change" },
{ validator: checkIsNull, trigger: "blur" } { validator: checkIsNull, trigger: "blur" }
], ],
menuUrl: [ menuUrl: [
{ required: true, message: "请输入菜单地址", trigger: "change" }, { required: true, message: "请输入菜单地址", trigger: "change" },
{ validator: checkIsNull, trigger: "blur" } { validator: checkIsNull, trigger: "blur" }
], ],
parentId: [ parentId: [
{ required: true, message: "请输入父级菜单", trigger: "change" } { required: true, message: "请输入父级菜单", trigger: "change" }
] ]
}, },
value: "", value: "",
name: "" name: ""
}; };
}, },
computed: {}, computed: {},
mounted() { mounted() {
this.onSearch(); this.onSearch();
// this.getPermis(); // this.getPermis();
}, },
components: {}, components: {},
methods: { methods: {
// 渲染父级权限 // 渲染父级权限
getPermis() { getPermis() {
let vm = this; let vm = this;
vm.$https({ vm.$https({
method: "get", method: "get",
url: "menu/getRoleMenu?roleId=" + sessionStorage.getItem("roleId"), url: "menu/getRoleMenu?roleId=" + sessionStorage.getItem("roleId"),
authType: this.backToken authType: this.backToken
}).then( }).then(
res => { res => {
let data = res.data; let data = res.data;
vm.typeList = data.map((e, i) => { vm.typeList = data.map((e, i) => {
return { return {
id: e.id, id: e.id,
name: name:
e.menuName.indexOf("-") == -1 e.menuName.indexOf("-") == -1
? e.menuName ? e.menuName
: e.menuName.split("-")[1] : e.menuName.split("-")[1]
}; };
}); });
}, },
error => { error => {
console.log(error); console.log(error);
} }
); );
}, },
// 获得数据接口 // 获得数据接口
getTableData(param) { getTableData(param) {
let vm = this; let vm = this;
vm.$https( vm.$https(
{ {
url: "copyrightOwner/getPageList", url: "copyrightOwner/getPageList",
method: "post", method: "post",
authType: this.backToken authType: this.backToken
}, },
vm.$qs.stringify(param) vm.$qs.stringify(param)
// param // param
) )
.then(res => { .then(res => {
let data = res.data.data; let data = res.data.data;
vm.page.pageSize = data.size; vm.page.pageSize = data.size;
vm.page.total = data.total; vm.page.total = data.total;
vm.tableData = data.records; vm.tableData = data.records;
}) })
.catch(function(err) { .catch(function(err) {
console.log(err); console.log(err);
}); });
}, },
// 分页 // 分页
handleCurrentChange(val) { handleCurrentChange(val) {
let _this = this; let _this = this;
_this.page.currentPage = val; _this.page.currentPage = val;
_this.onSearch(); _this.onSearch();
}, },
onSearch() { onSearch() {
let _this = this; let _this = this;
let param = _this.getSearchQuery(); let param = _this.getSearchQuery();
_this.getTableData(param); _this.getTableData(param);
}, },
// 重置 // 重置
Reset() { Reset() {
// this.$refs["form"].resetFields(); // this.$refs["form"].resetFields();
this.form = { ownerType: "VIDEO_CONTENT" }; this.form = { ownerType: "VIDEO_CONTENT" };
this.value1 = [] this.value1 = []
this.Search(); this.Search();
}, },
Search() { Search() {
let _this = this; let _this = this;
_this.page.currentPage = 1; _this.page.currentPage = 1;
let searchObj = { let searchObj = {
_index: 1, _index: 1,
_size: _this.page.pageSize, _size: _this.page.pageSize,
nameOrCode: _this.form.nameOrCode, nameOrCode: _this.form.nameOrCode,
ownerType: "VIDEO_CONTENT", ownerType: "VIDEO_CONTENT",
startDate: this.value1 ? this.value1[0] : "", startDate: this.value1 ? this.value1[0] : "",
endDate: this.value1 ? this.value1[1] : "" endDate: this.value1 ? this.value1[1] : ""
}; };
this.getTableData(searchObj); this.getTableData(searchObj);
}, },
// // 获取当前查询参数 // // 获取当前查询参数
getSearchQuery() { getSearchQuery() {
let _this = this; let _this = this;
let searchObj = { let searchObj = {
_index: _this.page.currentPage, _index: _this.page.currentPage,
_size: _this.page.pageSize _size: _this.page.pageSize
}; };
for (let key in _this.form) { for (let key in _this.form) {
if (_this.form[key]) { if (_this.form[key]) {
searchObj[key] = _this.form[key]; searchObj[key] = _this.form[key];
} }
} }
return searchObj; return searchObj;
}, },
// 添加 // 添加
addPermis() { addPermis() {
this.$router.push({ path: "videoCopyrightAdd", query: { type: "add" } }); this.$router.push({ path: "videoCopyrightAdd", query: { type: "add" } });
// $('.el-dialog__title').html('新建'); // $('.el-dialog__title').html('新建');
// this.FormVisible1 = true; // this.FormVisible1 = true;
}, },
// 添加权限 // 添加权限
permisSave() { permisSave() {
let _this = this; let _this = this;
_this.$refs.permisform.validate(valid => { _this.$refs.permisform.validate(valid => {
if (valid) { if (valid) {
_this _this
.$https( .$https(
{ url: "menu/add", method: "post", authType: this.backToken }, { url: "menu/add", method: "post", authType: this.backToken },
_this.$qs.stringify(_this.permisform) _this.$qs.stringify(_this.permisform)
) )
.then( .then(
res => { res => {
if (res.data.status == 200 || res.data.status == 201) { if (res.data.status == 200 || res.data.status == 201) {
_this.$message({ _this.$message({
type: "success", type: "success",
message: res.data.message message: res.data.message
}); });
//跳回用户列表 //跳回用户列表
_this.onSearch(); _this.onSearch();
_this.FormVisible1 = false; _this.FormVisible1 = false;
for (let key in _this.permisform) { for (let key in _this.permisform) {
_this.permisform[key] = null; _this.permisform[key] = null;
} }
_this.$refs["permisform"].resetFields(); _this.$refs["permisform"].resetFields();
} else { } else {
_this.$message({ _this.$message({
type: "error", type: "error",
message: res.data.message message: res.data.message
}); });
} }
}, },
error => { error => {
_this.$message({ _this.$message({
type: "error", type: "error",
message: error message: error
}); });
} }
); );
} }
}); });
}, },
// 编辑关闭 // 编辑关闭
close() { close() {
this.FormVisible = false; this.FormVisible = false;
this.$refs["editform"].resetFields(); this.$refs["editform"].resetFields();
}, },
// 新增关闭 // 新增关闭
close1() { close1() {
this.FormVisible1 = false; this.FormVisible1 = false;
for (let key in this.permisform) { for (let key in this.permisform) {
this.permisform[key] = null; this.permisform[key] = null;
} }
this.$refs["permisform"].resetFields(); this.$refs["permisform"].resetFields();
}, },
// 编辑弹框 // 编辑弹框
openEdit(row) { openEdit(row) {
this.$router.push({ this.$router.push({
path: "videoCopyrightUpdate", path: "videoCopyrightUpdate",
query: { type: "Update", id: row.id } query: { type: "Update", id: row.id }
}); });
// alert('编辑') // alert('编辑')
// $('.el-dialog__title').html('编辑'); // $('.el-dialog__title').html('编辑');
// let _this=this; // let _this=this;
// //成功之后清除数据 // //成功之后清除数据
// for (let key in this.editform) { // for (let key in this.editform) {
// _this.editform[key]=null; // _this.editform[key]=null;
// } // }
// _this.editform= Object.assign({}, row); // _this.editform= Object.assign({}, row);
// _this.FormVisible = true; // _this.FormVisible = true;
}, },
// 删除 // 删除
handleDelete(row) { handleDelete(row) {
let _this = this; let _this = this;
this.$confirm("此操作将永久删除, 是否继续?", "提示", { this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
_this _this
.$https({ .$https({
method: "delete", method: "delete",
url: "copyrightOwner/delete/" + row.id, url: "copyrightOwner/delete/" + row.id,
authType: this.backToken authType: this.backToken
}) })
.then( .then(
res => { res => {
if(res.data.resultCode === "200"){ if(res.data.resultCode === "200"){
this.$message({ type: "success", message: "删除成功!" }); this.$message({ type: "success", message: "删除成功!" });
_this.Search(); console.log(111)
}else{ _this.Search();
this.$message({ type: "error", message: res.data.message }); }else{
} this.$message({ type: "error", message: res.data.message });
// this.$message({ type: "success", message: "删除成功!" }); }
// this.msgInfo = { // this.$message({ type: "success", message: "删除成功!" });
// type: "wait", // this.msgInfo = {
// des: `删除申请已提交,待审核…`, // type: "wait",
// }; // des: `删除申请已提交,待审核…`,
// };
},
error => { },
this.$message({ error => {
type: "fail", this.$message({
message: "删除失败!" + error.response.data type: "fail",
}); message: "删除失败!" + error.response.data
} });
); }
}) );
.catch(() => {}); })
}, .catch(() => {});
// 保存编辑信息 },
submitForm() { // 保存编辑信息
let _this = this; submitForm() {
_this.$refs.editform.validate(valid => { let _this = this;
if (valid) { _this.$refs.editform.validate(valid => {
let searchObj = {}; if (valid) {
for (let key in _this.editform) { let searchObj = {};
if (this.editform[key]) { for (let key in _this.editform) {
searchObj[key] = _this.editform[key]; if (this.editform[key]) {
} searchObj[key] = _this.editform[key];
} }
let str = _this.editform.menuName; }
let index = str.lastIndexOf("-"); let str = _this.editform.menuName;
str = str.substring(index + 1, str.length); let index = str.lastIndexOf("-");
searchObj.menuName = str; str = str.substring(index + 1, str.length);
_this searchObj.menuName = str;
.$https( _this
{ .$https(
url: "menu/edit", {
method: "put", url: "menu/edit",
authType: this.backToken method: "put",
}, authType: this.backToken
_this.$qs.stringify(searchObj) },
) _this.$qs.stringify(searchObj)
.then( )
res => { .then(
if (res.data.status == 200 || res.data.status == 201) { res => {
_this.$message({ if (res.data.status == 200 || res.data.status == 201) {
type: "success", _this.$message({
message: res.data.message type: "success",
}); message: res.data.message
_this.onSearch(); });
_this.FormVisible = false; _this.onSearch();
_this.$refs["editform"].resetFields(); _this.FormVisible = false;
} else { _this.$refs["editform"].resetFields();
_this.$message({ } else {
type: "error", _this.$message({
message: res.data.message type: "error",
}); message: res.data.message
} });
}, }
error => { },
_this.$message({ error => {
type: "error", _this.$message({
message: error type: "error",
}); message: error
} });
); }
} );
}); }
}, });
},
// 批量操作
handleSelectionChange(selection) { // 批量操作
let _this = this; handleSelectionChange(selection) {
_this.selection = selection; let _this = this;
} _this.selection = selection;
} }
}; }
</script> };
</script>
<style lang="less">
// @import "../../../../style/common"; <style lang="less">
// @import "../../style/list"; // @import "../../../../style/common";
@import "../../../../style/table.less"; // @import "../../style/list";
@import "../../../../style/pagination.less"; @import "../../../../style/table.less";
</style> @import "../../../../style/pagination.less";
</style>
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