Commit 5b4eb6a5 authored by qzhxx's avatar qzhxx

merge

parents 6782c18a 35b05ad6
...@@ -13,6 +13,7 @@ module.exports = { ...@@ -13,6 +13,7 @@ module.exports = {
proxyTable: { proxyTable: {
'/mall': { '/mall': {
target: "http://192.168.110.67/mall", target: "http://192.168.110.67/mall",
// target: "http://192.168.204.66:8088/mall",
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/mall': '/' // 重写接口 '^/mall': '/' // 重写接口
......
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
left: 50%; left: 50%;
margin-top: -50%; margin-top: -50%;
margin-left: -50%; margin-left: -50%;
width:100%; width: 100%;
} }
.page-title { .page-title {
width: 100%; width: 100%;
...@@ -191,6 +191,7 @@ export default { ...@@ -191,6 +191,7 @@ export default {
.icon-pwd { .icon-pwd {
background: url("~@/assets/login/pwd.png") no-repeat center/ 100%; background: url("~@/assets/login/pwd.png") no-repeat center/ 100%;
} }
/deep/.el-form { /deep/.el-form {
width: 100%; width: 100%;
text-align: center; text-align: center;
...@@ -213,6 +214,9 @@ export default { ...@@ -213,6 +214,9 @@ export default {
padding-top: 12px; padding-top: 12px;
} }
} }
.el-form-item__error {
left: calc(50% - 160px);
}
.el-button.login { .el-button.login {
width: 320px; width: 320px;
height: 48px; height: 48px;
......
let statusOption = [
{ label: "活跃", value: 'ENABLE' },
{ label: "禁用", value: 'DISABLE' },
{ label: "待审核", value: 'TBC' },
]
export {
statusOption
}
\ No newline at end of file
...@@ -22,12 +22,20 @@ ...@@ -22,12 +22,20 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="item.isEdit" class="table-btn-group"> <div v-if="item.isEdit" class="table-btn-group">
<el-tooltip content="修改" placement="top"> <el-tooltip content="修改" placement="top">
<el-button circle @click="handleOperate(scope.row, 'edit')"> <el-button
circle
:disabled="scope.row.statusName !== '活跃'"
@click="handleOperate(scope.row, 'edit')"
>
<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="handleOperate(scope.row, 'reset')"> <el-button
circle
:disabled="scope.row.statusName !== '活跃'"
@click="handleOperate(scope.row, 'reset')"
>
<i class="icon-table icon-reset"></i> <i class="icon-table icon-reset"></i>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
......
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
} }
}, },
// 翻页 // 翻页
handleChangeCurrent() { handleChangeCurrent(val) {
this.page._index = val; this.page._index = val;
this.getPageList(); this.getPageList();
}, },
......
...@@ -206,7 +206,7 @@ export default { ...@@ -206,7 +206,7 @@ export default {
}); });
}, },
// 翻页 // 翻页
handleChangeCurrent() { handleChangeCurrent(val) {
this.page._index = val; this.page._index = val;
this.getPageList(); this.getPageList();
}, },
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
v-model="form.userName" v-model="form.userName"
placeholder="请输入用户名" placeholder="请输入用户名"
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -59,6 +60,7 @@ import { partyPagination } from "@/components/index"; ...@@ -59,6 +60,7 @@ import { partyPagination } from "@/components/index";
import accountTable from "./components/accountTable"; import accountTable from "./components/accountTable";
import { addDialog, editDialog } from "./statisticalDialog/index"; import { addDialog, editDialog } from "./statisticalDialog/index";
import msgDialog from "./msgDialog.vue"; import msgDialog from "./msgDialog.vue";
import { statusOption } from "@/config/account";
export default { export default {
data() { data() {
return { return {
...@@ -67,11 +69,7 @@ export default { ...@@ -67,11 +69,7 @@ export default {
status: "", status: "",
type: 5, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号 5. 统计账号 type: 5, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号 5. 统计账号
}, },
statusOption: [ statusOption: statusOption,
{ label: "活跃", value: 1 },
{ label: "禁用", value: 2 },
{ label: "待审核", value: 3 },
],
feildList: [ feildList: [
{ prop: "userName", label: "统计用户名" }, { prop: "userName", label: "统计用户名" },
{ prop: "orgName", label: "所属单位" }, { prop: "orgName", label: "所属单位" },
...@@ -270,7 +268,7 @@ export default { ...@@ -270,7 +268,7 @@ export default {
} }
}, },
// 翻页 // 翻页
handleChangeCurrent() { handleChangeCurrent(val) {
this.page._index = val; this.page._index = val;
this.getPageList(); this.getPageList();
}, },
......
...@@ -5,13 +5,18 @@ ...@@ -5,13 +5,18 @@
<el-form :inline="true" :model="form"> <el-form :inline="true" :model="form">
<el-form-item> <el-form-item>
<el-input <el-input
clearable
v-model="form.userName" v-model="form.userName"
placeholder="请输入运维人员姓名" placeholder="请输入运维人员姓名"
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="form.status" placeholder="请选择账号状态"> <el-select
v-model="form.status"
placeholder="请选择账号状态"
clearable
>
<el-option <el-option
v-for="(item, index) in statusOption" v-for="(item, index) in statusOption"
:key="index" :key="index"
...@@ -56,6 +61,7 @@ import { partyPagination } from "@/components/index"; ...@@ -56,6 +61,7 @@ import { partyPagination } from "@/components/index";
import accountTable from "./components/accountTable"; import accountTable from "./components/accountTable";
import { addDialog, editDialog } from "./stbDialog/index"; import { addDialog, editDialog } from "./stbDialog/index";
import msgDialog from "./msgDialog.vue"; import msgDialog from "./msgDialog.vue";
import { statusOption } from "@/config/account";
export default { export default {
data() { data() {
return { return {
...@@ -64,11 +70,7 @@ export default { ...@@ -64,11 +70,7 @@ export default {
status: "", status: "",
type: 4, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号 type: 4, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号
}, },
statusOption: [ statusOption: statusOption,
{ label: "活跃", value: 1 },
{ label: "禁用", value: 2 },
{ label: "待审核", value: 3 },
],
feildList: [ feildList: [
{ prop: "userName", label: "运维人员姓名" }, { prop: "userName", label: "运维人员姓名" },
{ prop: "orgName", label: "运维区域" }, { prop: "orgName", label: "运维区域" },
...@@ -258,7 +260,7 @@ export default { ...@@ -258,7 +260,7 @@ export default {
} }
}, },
// 翻页 // 翻页
handleChangeCurrent() { handleChangeCurrent(val) {
this.page._index = val; this.page._index = val;
this.getPageList(); this.getPageList();
}, },
......
...@@ -315,7 +315,7 @@ export default { ...@@ -315,7 +315,7 @@ export default {
} }
}, },
// 翻页 // 翻页
handleChangeCurrent() { handleChangeCurrent(val) {
this.page._index = val; this.page._index = val;
this.getPageList(); this.getPageList();
}, },
......
...@@ -131,8 +131,8 @@ export default { ...@@ -131,8 +131,8 @@ export default {
}, },
// 编辑 // 编辑
handleEdit() { handleEdit() {
this.$refs.editDialog.id = this.activeRow.id this.$refs.editDialog.id = this.activeRow.id;
this.$refs.editDialog.getDetailById() this.$refs.editDialog.getDetailById();
this.$refs.editDialog.dialogVisible = true; this.$refs.editDialog.dialogVisible = true;
}, },
// 重置密码 // 重置密码
...@@ -238,7 +238,7 @@ export default { ...@@ -238,7 +238,7 @@ export default {
} }
}, },
// 翻页 // 翻页
handleChangeCurrent() { handleChangeCurrent(val) {
this.page._index = val; this.page._index = val;
this.getPageList(); this.getPageList();
}, },
......
...@@ -3,10 +3,9 @@ ...@@ -3,10 +3,9 @@
<el-dialog <el-dialog
custom-class="party-dialog" custom-class="party-dialog"
title="视频详情" title="视频详情"
width="80%" width="900px"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:before-close="close" :before-close="close"
> >
<div> <div>
<!-- <!--
...@@ -15,9 +14,16 @@ ...@@ -15,9 +14,16 @@
</video> </video>
<button @click="playClick" :class="{hide: isPlay}">点击播放</button> --> <button @click="playClick" :class="{hide: isPlay}">点击播放</button> -->
<!--class="video-js vjs-default-skin vjs-big-play-centered" --> <!--class="video-js vjs-default-skin vjs-big-play-centered" -->
<video :preload="preload" <video
:poster="videoImg" :height="height" :width="width" align="center" :controls="controls" :autoplay="autoplay"> :preload="preload"
<source :src="videoSrc" type="video/mp4"> :poster="videoImg"
:height="height"
:width="width"
align="center"
:controls="controls"
:autoplay="autoplay"
>
<source :src="videoSrc" type="video/mp4" />
</video> </video>
</div> </div>
<!-- <div slot="footer" class="dialog-footer btn-group"> <!-- <div slot="footer" class="dialog-footer btn-group">
...@@ -30,29 +36,28 @@ ...@@ -30,29 +36,28 @@
export default { export default {
data() { data() {
return { return {
dialogVisible:false, dialogVisible: false,
videoSrc: 'https://video.pearvideo.com/mp4/short/20200209/cont-1650197-14888002-hd.mp4', // videoSrc: 'https://video.pearvideo.com/mp4/short/20200209/cont-1650197-14888002-hd.mp4',
videoImg: 'https://sm.ms/image/ueRFCZfk2xTONGb', // videoImg: 'https://sm.ms/image/ueRFCZfk2xTONGb',
playStatus: '', videoSrc: "",
muteStatus: '', videoImg: "",
playStatus: "",
muteStatus: "",
isMute: true, isMute: true,
isPlay: false, isPlay: false,
width: '820', // 设置视频播放器的显示宽度(以像素为单位) width: "820", // 设置视频播放器的显示宽度(以像素为单位)
height: '500', // 设置视频播放器的显示高度(以像素为单位) height: "500", // 设置视频播放器的显示高度(以像素为单位)
preload: 'auto', // 建议浏览器是否应在<video>加载元素后立即开始下载视频数据。 preload: "auto", // 建议浏览器是否应在<video>加载元素后立即开始下载视频数据。
controls: true, // 确定播放器是否具有用户可以与之交互的控件。没有控件,启动视频播放的唯一方法是使用autoplay属性或通过Player API。 controls: true, // 确定播放器是否具有用户可以与之交互的控件。没有控件,启动视频播放的唯一方法是使用autoplay属性或通过Player API。
autoplay: '' autoplay: "",
} };
}, },
methods: { methods: {
// 新增关闭 // 新增关闭
close() { close() {
this.dialogVisible = false; this.dialogVisible = false;
}, },
},
}
}; };
</script> </script>
......
...@@ -76,9 +76,9 @@ export default { ...@@ -76,9 +76,9 @@ export default {
this.filedata.append('file', file.file) this.filedata.append('file', file.file)
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const isLt5M = file.size / 1024 / 1024 < 5; const isLt5M = file.size / 1024 < 1;
if (!isLt5M) { if (!isLt5M) {
this.$message.error("上传文件大小不能超过 5MB!"); this.$message.error("上传文件大小不能超过 1GB!");
} }
return isLt5M; return isLt5M;
} }
......
...@@ -69,18 +69,16 @@ export default { ...@@ -69,18 +69,16 @@ export default {
console.log(err); console.log(err);
_this.$message.error(err.msg || err.message); _this.$message.error(err.msg || err.message);
}); });
}, },
uploadFile(file) { uploadFile(file) {
this.filedata.append('file', file.file) this.filedata.append('file', file.file)
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const isLt5M = file.size / 1024 / 1024 < 5; const isLt10G = file.size / 1024 < 10;
if (!isLt5M) { if (!isLt10G) {
this.$message.error("上传文件大小不能超过 5MB!"); this.$message.error("上传文件大小不能超过 10GB!");
} }
return isLt5M; return isLt10G;
} }
} }
}; };
......
...@@ -76,11 +76,11 @@ export default { ...@@ -76,11 +76,11 @@ export default {
this.filedata.append('file', file.file) this.filedata.append('file', file.file)
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const isLt5M = file.size / 1024 / 1024 < 5; const isLt10G = file.size / 1024 < 10;
if (!isLt5M) { if (!isLt10G) {
this.$message.error("上传文件大小不能超过 5MB!"); this.$message.error("上传文件大小不能超过 10GB!");
} }
return isLt5M; return isLt10G;
}, },
handleRequest(file) { handleRequest(file) {
// let formData = new FormData(); // let formData = new FormData();
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
:on-remove="handleRemove" :on-remove="handleRemove"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:headers="headers" :headers="headers"
:file-list="fileList"
accept=""
> >
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
...@@ -21,35 +23,53 @@ export default { ...@@ -21,35 +23,53 @@ export default {
data() { data() {
return { return {
dialogImageUrl: "", dialogImageUrl: "",
dialogVisible: false dialogVisible: false,
fileList: [
{
name: "",
url: "",
},
],
}; };
}, },
computed: { computed: {
headers() { headers() {
// return { 'authType': this.backToken } return {
return {'Authorization':localStorage.getItem('backToken')} Authorization: localStorage.getItem("backToken") || "",
} };
},
}, },
methods: { methods: {
// 图片上传成功的返回值 // 图片上传成功的返回值
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
if (res.resultCode == 200) {
console.log(res) this.$emit("imgUrl", res.data.url);
console.log(res.data.url) this.imageUrl = res.data.url;
this.$emit('imgUrl', res.data.url) } else {
// console.log(data.fileList[0].url) this.$message.error(res.message);
// this.imageUrl = URL.createObjectURL(file.raw); }
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
console.log(file, fileList); this.$emit("imgUrl", "");
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
this.dialogImageUrl = file.url; this.dialogImageUrl = file.url;
this.dialogVisible = true; this.dialogVisible = true;
} },
} showImg(cover) {
let file = {
name: "",
url: cover,
};
this.fileList = [file]
},
},
}; };
</script> </script>
<style> <style>
.avatar {
width: 100%;
height: 100%;
}
</style> </style>
...@@ -6,38 +6,44 @@ ...@@ -6,38 +6,44 @@
</video> </video>
<button @click="playClick" :class="{hide: isPlay}">点击播放</button> --> <button @click="playClick" :class="{hide: isPlay}">点击播放</button> -->
<!--class="video-js vjs-default-skin vjs-big-play-centered" --> <!--class="video-js vjs-default-skin vjs-big-play-centered" -->
<video :preload="preload" <video
:poster="videoImg" :height="height" :width="width" align="center" :controls="controls" :autoplay="autoplay"> :preload="preload"
<source :src="videoSrc" type="video/mp4"> :poster="videoImg"
:height="height"
:width="width"
align="center"
:controls="controls"
:autoplay="autoplay"
>
<source :src="videoSrc" type="video/mp4" />
</video> </video>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'Video', name: "Video",
data () { data() {
return { return {
videoSrc: 'https://video.pearvideo.com/mp4/short/20200209/cont-1650197-14888002-hd.mp4', videoSrc:
videoImg: 'https://sm.ms/image/ueRFCZfk2xTONGb', "https://video.pearvideo.com/mp4/short/20200209/cont-1650197-14888002-hd.mp4",
playStatus: '', videoImg: "https://sm.ms/image/ueRFCZfk2xTONGb",
muteStatus: '', playStatus: "",
muteStatus: "",
isMute: true, isMute: true,
isPlay: false, isPlay: false,
width: '820', // 设置视频播放器的显示宽度(以像素为单位) width: "820", // 设置视频播放器的显示宽度(以像素为单位)
height: '500', // 设置视频播放器的显示高度(以像素为单位) height: "500", // 设置视频播放器的显示高度(以像素为单位)
preload: 'auto', // 建议浏览器是否应在<video>加载元素后立即开始下载视频数据。 preload: "auto", // 建议浏览器是否应在<video>加载元素后立即开始下载视频数据。
controls: true, // 确定播放器是否具有用户可以与之交互的控件。没有控件,启动视频播放的唯一方法是使用autoplay属性或通过Player API。 controls: true, // 确定播放器是否具有用户可以与之交互的控件。没有控件,启动视频播放的唯一方法是使用autoplay属性或通过Player API。
autoplay: '' autoplay: "",
} };
} },
// 自动播放属性,muted:静音播放 // 自动播放属性,muted:静音播放
// autoplay: 'muted', // autoplay: 'muted',
};
}
</script> </script>
<style scoped > <style scoped >
</style> </style>
<template> <template>
<div class="info"> <div class="info">
<!-- <audio-play></audio-play> -->
<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-container"> <div class="info-container">
<div class="info-wrapper"> <div class="info-wrapper">
<el-form :model="ruleForm" <el-form
:model="ruleForm"
:rules="rules" :rules="rules"
ref="ruleForm" ref="ruleForm"
label-width="140px" label-width="140px"
class="demo-form-inline party-form" class="demo-form-inline party-form"
:inline="true" :inline="true"
label-position="top"> label-position="top"
<el-form-item label="学习内容名称" prop="name" class="w50" style="padding-right:100px;"> >
<el-form-item
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 --> <!-- ALL_PLAT,THIS_ORGAN,THIS_ORGAN_SUB -->
全平台 全平台
<!-- <el-input v-model="ruleForm.applicableScope"></el-input> -->
<!-- <el-radio-group 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 label="所属学习项目" class="w50"> <el-form-item
label="所属学习项目"
class="w50"
prop="learningProjectId"
>
<el-select <el-select
placeholder="请选所属学习项目" placeholder="请选所属学习项目"
@focus="getLearnProject"
v-model="ruleForm.learningProjectId" v-model="ruleForm.learningProjectId"
> >
<el-option <el-option
...@@ -39,19 +43,25 @@ ...@@ -39,19 +43,25 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="学习内容宣传图" prop="cover" class="w100"> <el-form-item label="学习内容宣传图" prop="cover" class="w100">
<!-- <img class="imgSize" src alt /> --> <upload-img ref="uploadImg" @imgUrl="imgUrl"></upload-img>
<upload-img @imgUrl="imgUrl"></upload-img>
</el-form-item> </el-form-item>
<el-form-item
<el-form-item class="selectH100 w50" label="展板类别" prop="exhibitionBoardCatIdList"> class="w50"
label="展板类别"
prop="exhibitionBoardCatIdList"
>
<el-select <el-select
placeholder="请选择展板类别" placeholder="请选择展板类别"
@focus="getAssetTypeData"
multiple multiple
v-model="ruleForm.exhibitionBoardCatIdList" v-model="ruleForm.exhibitionBoardCatIdList"
@change="getSelectDep" @change="getSelectDep"
> >
<el-checkbox :style="selfstyle" v-model="checkedThing" @change="selectAllThing">全选</el-checkbox> <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"
...@@ -60,15 +70,19 @@ ...@@ -60,15 +70,19 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="selectH100" label="版权方" prop="copyrightOwnerIdList"> <el-form-item label="版权方" prop="copyrightOwnerIdList">
<el-select <el-select
placeholder="请选择版权方" placeholder="请选择版权方"
@focus="getAssetTypeData2"
multiple multiple
v-model="ruleForm.copyrightOwnerIdList" v-model="ruleForm.copyrightOwnerIdList"
@change="getSelectDep2" @change="getSelectDep2"
> >
<el-checkbox :style="selfstyle" v-model="checkedThing2" @change="selectAllThing2">全选</el-checkbox> <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"
...@@ -77,40 +91,59 @@ ...@@ -77,40 +91,59 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="展板备选清单" class="w100"></el-form-item> <el-form-item
</el-form> label="展板备选清单"
<div class> class="w100"
<!-- {{multipleSelection}} --> prop="exhibitionBoardIdList"
<!-- {{ruleForm.exhibitionBoardIdList}} --> >
<el-table <el-table
border border
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
style="width: 100%;height:300px;overflow:auto;" style="width: 100%"
height="100%" max-height="400"
ref="multipleTable" ref="multipleTable"
:data="tableData"> :data="tableData"
<el-table-column type="selection" width="55" ></el-table-column> >
<el-table-column type="index" width="120" label="序号"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column show-overflow-tooltip label="版权方名称" prop="name"></el-table-column> <el-table-column
<el-table-column show-overflow-tooltip label="展板类别" prop="exhibitionBoardCatName"></el-table-column> type="index"
<el-table-column show-overflow-tooltip label="展板版权方" prop="boardCopyrightOwnerName"></el-table-column> width="120"
label="序号"
></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 <el-button
type="text" type="text"
style="padding:0" style="padding: 0"
@click="videoPreview(scope.row)" @click="videoPreview(scope.row)"
>视频预览</el-button> >视频预览</el-button
>
<el-button <el-button
type="text" type="text"
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>
<!--新增弹框--> <!--新增弹框-->
<el-dialog <el-dialog
custom-class="party-dialog" custom-class="party-dialog"
...@@ -130,206 +163,315 @@ ...@@ -130,206 +163,315 @@
class="party-form" class="party-form"
> >
<el-form-item label="展板名称"> <el-form-item label="展板名称">
<el-input v-model="classForm.name"></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 v-model="classForm.name"></el-input> <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 v-model="classForm.name"></el-input> <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 type="textarea" v-model="classForm.remarks"></el-input> <el-input
type="textarea"
v-model="classForm.remarks"
readonly
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<!-- <div slot="footer" class="dialog-footer btn-group">
<el-button size="mini" type="primary" @click="save('classForm')">确定</el-button>
<el-button size="mini" @click="close">取 消</el-button>
</div> -->
</el-dialog> </el-dialog>
</div> </div>
</div> </div>
<div class="info-footer"> <div class="info-footer">
<div class="btn-group"> <div class="btn-group">
<!-- 确定、取消 --> <!-- 确定、取消 -->
<el-button v-show="type === 'add'" size="mini" type="primary" class="btn_form_search" @click="submitForm('ruleForm')">提交审核</el-button> <el-button
<el-button v-show="type === 'Update'" size="mini" type="primary" class="btn_form_search" @click="updateForm('ruleForm')">提交审核</el-button> v-show="type === 'add'"
<el-button size="mini" class="btn_form_search" @click="close">取消</el-button> size="mini"
type="primary"
class="btn_form_search"
@click="submitForm('ruleForm')"
>提交审核</el-button
>
<el-button
v-show="type === 'Update'"
size="mini"
type="primary"
class="btn_form_search"
@click="updateForm('ruleForm')"
>提交审核</el-button
>
<el-button size="mini" class="btn_form_search" @click="close"
>取消</el-button
>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import uploadImg from '@/page/content/components/uploadVue/uploadImg' import uploadImg from "@/page/content/components/uploadVue/uploadImg";
import videoDialog from '@/page/content/components/dialog/videoDialog' import videoDialog from "@/page/content/components/dialog/videoDialog";
import audioPlay from '@/page/content/components/audioPlay' import audioPlay from "@/page/content/components/audioPlay";
export default { export default {
components:{ components: {
uploadImg, uploadImg,
videoDialog, videoDialog,
audioPlay audioPlay,
}, },
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
classForm: {}, classForm: {},
type: this.$route.query.type, type: this.$route.query.type,
learningProjectIdList:'', learningProjectIdList: "",
videoContentCat: [], videoContentCat: [],
assetType2:[], assetType2: [], // 版权方列表
checkedThing: false, checkedThing: false,
checkedThing2:false, checkedThing2: false,
selfstyle: { selfstyle: {
textAlign: "right", textAlign: "right",
width: "100%", width: "100%",
paddingRight: "10px" paddingRight: "10px",
}, },
tableData: [], tableData: [],
ruleForm: { ruleForm: {
applicableScope :"ALL_PLAT", name: "", //学习内容名称
exhibitionBoardIdList:[] applicableScope: "ALL_PLAT", //适用范围
},rules: { cover: "", //宣传图
learningProjectId: "", //所属学习项目
exhibitionBoardCatIdList: [], //展板类别
copyrightOwnerIdList: [], //版权方
exhibitionBoardIdList: [], // 展板备选
},
rules: {
name: [ name: [
{ required: true, message: "请输入版权方名称", trigger: "blur" } { required: true, message: "请输入学习内容名称", trigger: "blur" },
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
], ],
date1: [ cover: [
{ {
type: "date",
required: true, required: true,
message: "请选择日期", message: "请选择学习内容宣传图",
trigger: "change" },
} ],
learningProjectId: [
{ required: true, message: "请选择所属学习项目", trigger: "change" },
], ],
date2: [ exhibitionBoardCatIdList: [
{ {
type: "date",
required: true, required: true,
message: "请选择时间", type: "array",
trigger: "change" message: "请选择展板类别",
} trigger: "change",
},
], ],
copyrightOwnerIdList: [
{
required: true,
type: "array",
message: "请选择版权方",
trigger: "change",
},
],
exhibitionBoardIdList: [
{
required: true,
type: "array",
message: "请选择展板",
trigger: "change",
}, },
multipleSelection:[] ],
},
multipleSelection: [],
}; };
}, },
mounted(){ mounted() {
this.init() this.init();
}, },
methods: { methods: {
// 视频预览 // 视频预览
videoPreview(row){ videoPreview(row) {
// alert("视频") this.$refs.videoDialog.dialogVisible = true;
// console.log(row,'222') this.$refs.videoDialog.videoImg = row.cover;
this.$refs.videoDialog.dialogVisible = true let videoList0 = row.videoList[0];
this.$refs.videoDialog.videoImg = row.cover this.$refs.videoDialog.videoSrc = videoList0 ? videoList0.fileUrl : "";
this.$refs.videoDialog.videoSrc = row.videoList[0].fileUrl
}, },
// 展板预览 // 展板预览
displayPreview(row) { displayPreview(row) {
this.dialogVisible = true; this.dialogVisible = true;
this.classForm =row this.classForm = row;
}, },
// 关闭弹窗 // 关闭弹窗
closeDialog(){ closeDialog() {
this.dialogVisible = false; this.dialogVisible = false;
}, },
init() { init() {
this.getLearnProject();
this.getAssetTypeData();
this.getAssetTypeData2();
if (this.$route.query.type === "Update") { if (this.$route.query.type === "Update") {
this.getInfo(this.$route.query.id); this.getInfo(this.$route.query.id);
this.getLearnProject()
this.getAssetTypeData()
this.getAssetTypeData2()
// this.getLearnContentBoard()
} }
}, },
// 获取版权方详情 // 获取版权方详情
getInfo(id) { getInfo(id) {
let vm = this; let vm = this;
vm.$https( vm.$https({
{
url: "learningContent/get/" + id, url: "learningContent/get/" + id,
method: "get", method: "get",
authType: this.backToken authType: this.backToken,
} })
// param .then((res) => {
)
.then(res => {
let data = res.data.data; let data = res.data.data;
this.ruleForm = data; this.ruleForm = data;
console.log(this.ruleForm)
this.ruleForm = { this.ruleForm = {
name :data.name, name: data.name,
applicableScope:data.applicableScope, applicableScope: data.applicableScope,
copyrightOwnerIdList:data.copyrightOwnerIdList, copyrightOwnerIdList: data.copyrightOwnerIdList,
cover:data.cover, cover: data.cover,
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.multipleSelection = data.exhibitionBoardList;
this.$refs.uploadImg.showImg(this.ruleForm.cover);
this.getExhibitionBoardTable();
})
.catch(function (err) {
console.log(err);
});
},
getExhibitionBoardTable() {
const param = {
boardCopyrightOwnerIdList: this.ruleForm.copyrightOwnerIdList,
exhibitionBoardCatIdList: this.ruleForm.exhibitionBoardCatIdList,
};
this.getTableData(param, "update");
},
setSelctTable() {
if (!this.multipleSelection.length) {
return false;
} }
this.tableData = data.exhibitionBoardList let _this = this;
this.multipleSelection = data.exhibitionBoardList let tableData = this.tableData;
let multipleSelection = this.multipleSelection;
tableData.forEach((v) => {
multipleSelection.forEach((m) => {
if (v.id == m.id) {
_this.$refs.multipleTable.toggleRowSelection(v);
}
});
});
},
// 获取展板类别列表
getAssetTypeData() {
let vm = this;
vm.$https({
url: "exhibitionBoardCat/getList",
method: "get",
authType: this.backToken,
})
.then((res) => {
let data = res.data.data;
vm.videoContentCat = data;
}) })
.catch(function(err) { .catch(function (err) {
console.log(err); console.log(err);
}); });
}, },
// 获取获取学习内容展板全部列表 // 获取版权方列表
getLearnContentBoard(){ getAssetTypeData2() {
let vm = this;
vm.$https(
{
url: "copyrightOwner/getList",
method: "get",
authType: this.backToken,
},
{ copyrightOwnerType: "EXHIBITION_BOARD" }
)
.then((res) => {
let data = res.data.data;
vm.assetType2 = data;
})
.catch(function (err) {
console.log(err);
});
},
// 获取学习项目列表
getLearnProject() {
let vm = this; let vm = this;
vm.$https({ vm.$https({
url: "learningProject/getList",
method: "get",
authType: this.backToken,
})
.then((res) => {
let data = res.data.data;
vm.learningProjectIdList = data;
})
.catch(function (err) {
console.log(err);
});
},
// 获取获取学习内容展板全部列表
getLearnContentBoard() {
let vm = this;
vm.$https(
{
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);
// this.tableData = data
// this.multipleSelection = data
}) })
.catch(function(err) { .catch(function (err) {
console.log(err); console.log(err);
}); });
}, },
// 多选赋值 // 多选赋值
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
// this.ruleForm.exhibitionBoardIdList = 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 {
...@@ -340,22 +482,22 @@ export default { ...@@ -340,22 +482,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 {
...@@ -364,27 +506,10 @@ export default { ...@@ -364,27 +506,10 @@ export default {
} }
}); });
}, },
// 获取学习项目列表
getLearnProject(){ imgUrl(url) {
let vm = this; this.ruleForm.cover = url;
vm.$https({ this.$refs.ruleForm.validateField("cover");
url: "learningProject/getList",
method: "get",
authType: this.backToken
})
.then(res => {
let data = res.data.data;
this.learningProjectIdList = data;
// this.value1[0]=data.expireDateEnd
//this.value1[1]=data.expireDateStart
})
.catch(function(err) {
console.log(err);
});
},
imgUrl(url){
console.log(url,'图片服务器地址')
this.ruleForm.cover = url
}, },
getSelectDep(exhibitionBoardCatIdList) { getSelectDep(exhibitionBoardCatIdList) {
if (exhibitionBoardCatIdList.length === this.videoContentCat.length) { if (exhibitionBoardCatIdList.length === this.videoContentCat.length) {
...@@ -395,39 +520,39 @@ export default { ...@@ -395,39 +520,39 @@ export default {
}, },
// //
getSelectDep2(exhibitionBoardCatIdList) { getSelectDep2(exhibitionBoardCatIdList) {
if (exhibitionBoardCatIdList.length === this.assetType2.length) { if (exhibitionBoardCatIdList.length === this.assetType2.length) {
this.checkedThing2 = true; this.checkedThing2 = true;
} else { } else {
this.checkedThing2 = false; this.checkedThing2 = false;
} }
console.log(this.ruleForm.exhibitionBoardCatIdList,"分类")
console.log(this.ruleForm.copyrightOwnerIdList,"展板")
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);
}, },
// 根据展板类别,版权方获取展板备选清单 // 根据展板类别,版权方获取展板备选清单
getTableData(param) { getTableData(param, type) {
let vm = this; let vm = this;
vm.$https( vm.$https(
{ {
url: "exhibitionBoard/getList", url: "exhibitionBoard/getList",
method: "get", method: "get",
authType: this.backToken authType: this.backToken,
}, },
vm.$qs.stringify(param) vm.$qs.stringify(param)
// param
) )
.then(res => { .then((res) => {
let data = res.data.data; let data = res.data.data;
console.log(data)
vm.tableData = data; vm.tableData = data;
if (type) {
// 选中表格数据
setTimeout(() => {
vm.setSelctTable();
}, 1000);
}
}) })
.catch(function(err) { .catch(function (err) {
console.log(err); console.log(err);
}); });
}, },
...@@ -436,7 +561,7 @@ export default { ...@@ -436,7 +561,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 {
...@@ -447,50 +572,14 @@ export default { ...@@ -447,50 +572,14 @@ 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 {
this.ruleForm.copyrightOwnerIdList = []; this.ruleForm.copyrightOwnerIdList = [];
} }
}, },
// 获取视频分类列表
getAssetTypeData() {
let vm = this;
vm.$https({
url: "exhibitionBoardCat/getList",
method: "get",
authType: this.backToken
})
.then(res => {
let data = res.data.data;
this.videoContentCat = data;
// this.value1[0]=data.expireDateEnd
//this.value1[1]=data.expireDateStart
})
.catch(function(err) {
console.log(err);
});
},
// 获取展板列表
getAssetTypeData2() {
let vm = this;
vm.$https(
{
url: "copyrightOwner/getList",
method: "get",
authType: this.backToken
},
{ copyrightOwnerType: "EXHIBITION_BOARD" }
)
.then(res => {
let data = res.data.data;
this.assetType2 = data;
})
.catch(function(err) {
console.log(err);
});
},
// 新增 // 新增
addSubmit() { addSubmit() {
// 至少选一个备选清单 提示 // 至少选一个备选清单 提示
...@@ -507,7 +596,7 @@ export default { ...@@ -507,7 +596,7 @@ export default {
} else { } else {
this.$message({ this.$message({
message: "已经是第一条,上移失败", message: "已经是第一条,上移失败",
type: "warning" type: "warning",
}); });
} }
}, },
...@@ -515,15 +604,15 @@ export default { ...@@ -515,15 +604,15 @@ 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>
......
<template> <template>
<div class="listPage H100"> <div class="listPage H100">
<div class="search-container"> <div class="search-container">
<el-form :inline="true" :model="form" class="search-form" onsubmit="return false;"> <el-form :inline="true" :model="form" onsubmit="return false;">
<el-form-item > <el-form-item>
<el-input <el-input
size="mini"
placeholder="请输入学习内容名称" placeholder="请输入学习内容名称"
v-model="form.name" v-model="form.name"
@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"
...@@ -23,8 +22,12 @@ ...@@ -23,8 +22,12 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div class="btn-group"> <div class="btn-group">
<el-button size="mini" type="primary" class="btn_form_search" @click="Search">查询</el-button> <el-button type="primary" class="btn_form_search" @click="Search"
<el-button size="mini" class="btn_form_search" @click="Reset">重置</el-button> >查询</el-button
>
<el-button size="mini" class="btn_form_search" @click="Reset"
>重置</el-button
>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -40,33 +43,53 @@ ...@@ -40,33 +43,53 @@
<div class="party-table"> <div class="party-table">
<el-table <el-table
border border
style="width: 100%;height:100%" height="100%" style="width: 100%; height: 100%"
height="100%"
ref="multipleTable" ref="multipleTable"
:data="tableData" :data="tableData"
@selection-change="handleSelectionChange"
> >
<el-table-column type="index" width="120" label="序号"></el-table-column> <el-table-column
<el-table-column show-overflow-tooltip label="学习内容名称" prop="name"></el-table-column> type="index"
width="120"
label="序号"
></el-table-column>
<el-table-column
show-overflow-tooltip
label="学习内容名称"
prop="name"
></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 show-overflow-tooltip label="所含展板数量" prop="exhibitionBoardCount"></el-table-column> <el-table-column
show-overflow-tooltip
label="所含展板数量"
prop="exhibitionBoardCount"
></el-table-column>
<el-table-column label="审核状态" prop="auditStatus"> <el-table-column label="审核状态" prop="auditStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.auditStatus === 'TBC'">待初审</span> <span v-if="scope.row.auditStatus === 'TBC'">待初审</span>
<span v-else-if="scope.row.auditStatus === 'REFUSED'">已驳回</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 === 'TBCA'">待复审</span>
<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="使用状态" prop="published"> <el-table-column label="使用状态" prop="published">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.published"></span> <span v-if="scope.row.published">禁用</span>
<span v-else></span> <span v-else>启用</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column show-overflow-tooltip label="备注" prop="remarks"></el-table-column> <el-table-column
<el-table-column label="操作" width="240" header-align="center" align="center"> label="操作"
<template slot-scope="scope" > width="240"
header-align="center"
align="center"
>
<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)">
...@@ -79,12 +102,12 @@ ...@@ -79,12 +102,12 @@
</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 @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 @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>
...@@ -112,8 +135,6 @@ ...@@ -112,8 +135,6 @@
</div> </div>
<div class="partyt-pagination"> <div class="partyt-pagination">
<el-pagination <el-pagination
small
background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page.currentPage" :current-page="page.currentPage"
:page-size="page.pageSize" :page-size="page.pageSize"
...@@ -144,48 +165,47 @@ export default { ...@@ -144,48 +165,47 @@ export default {
FormVisible1: false, FormVisible1: false,
formLabelWidth: "100px", formLabelWidth: "100px",
form: { form: {
name: "" name: "",
}, },
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();
}, },
components: {}, components: {},
methods: { methods: {
...@@ -252,10 +272,12 @@ export default { ...@@ -252,10 +272,12 @@ export default {
let vm = this; let vm = this;
vm.$https({ vm.$https({
method: "get", method: "get",
url: "menu/getRoleMenu?roleId=" + sessionStorage.gelearningContent("roleId"), url:
authType: this.backToken "menu/getRoleMenu?roleId=" +
sessionStorage.gelearningContent("roleId"),
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 {
...@@ -263,27 +285,29 @@ export default { ...@@ -263,27 +285,29 @@ export default {
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);
} }
); );
}, },
// 上下架 // 上下架
handlePublish(row ,isPublish) { handlePublish(row, isPublish) {
let _this = this; let _this = this;
_this _this
.$https({ .$https(
{
method: "put", method: "put",
url: "learningContent/enable/" + row.id, url: "learningContent/enable/" + row.id,
authType: this.backToken authType: this.backToken,
}, },
_this.$qs.stringify({isPublish:isPublish})) _this.$qs.stringify({ isPublish: isPublish })
)
.then( .then(
res => { (res) => {
// this.$message({ type: "success", message: "删除成功!" }); // this.$message({ type: "success", message: "删除成功!" });
// alert("已提交审核!") // alert("已提交审核!")
this.msgInfo = { this.msgInfo = {
...@@ -292,10 +316,10 @@ export default { ...@@ -292,10 +316,10 @@ export default {
}; };
_this.Search(); _this.Search();
}, },
error => { (error) => {
this.$message({ this.$message({
type: "fail", type: "fail",
message: "失败!" + error.response.data message: "失败!" + error.response.data,
}); });
} }
); );
...@@ -307,18 +331,18 @@ export default { ...@@ -307,18 +331,18 @@ export default {
{ {
url: "learningContent/getPageList", url: "learningContent/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);
}); });
}, },
...@@ -334,10 +358,10 @@ export default { ...@@ -334,10 +358,10 @@ export default {
_this.getTableData(param); _this.getTableData(param);
}, },
// 重置 // 重置
Reset(){ Reset() {
// this.$refs["form"].resetFields(); this.form = {};
this.form = {} this.value1 = "";
this.Search() this.Search();
}, },
Search() { Search() {
let _this = this; let _this = this;
...@@ -346,8 +370,8 @@ export default { ...@@ -346,8 +370,8 @@ export default {
_index: 1, _index: 1,
_size: _this.page.pageSize, _size: _this.page.pageSize,
name: _this.form.name, name: _this.form.name,
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);
}, },
...@@ -356,7 +380,7 @@ export default { ...@@ -356,7 +380,7 @@ export default {
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]) {
...@@ -372,13 +396,13 @@ export default { ...@@ -372,13 +396,13 @@ export default {
// this.FormVisible1 = true; // this.FormVisible1 = true;
}, },
// 学习内容详情 // 学习内容详情
learnDetails(row){ learnDetails(row) {
this.$router.push({ path: "learnContentDetails", query: { id: row.id } }); this.$router.push({ path: "learnContentDetails", query: { id: row.id } });
}, },
// 添加权限 // 添加权限
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(
...@@ -386,11 +410,11 @@ export default { ...@@ -386,11 +410,11 @@ export default {
_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();
...@@ -402,14 +426,14 @@ export default { ...@@ -402,14 +426,14 @@ export default {
} 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,
}); });
} }
); );
...@@ -433,7 +457,7 @@ export default { ...@@ -433,7 +457,7 @@ export default {
openEdit(row) { openEdit(row) {
this.$router.push({ this.$router.push({
path: "learnContentUpdate", path: "learnContentUpdate",
query: { type: "Update" ,id :row.id} query: { type: "Update", id: row.id },
}); });
// alert('编辑') // alert('编辑')
// $('.el-dialog__title').html('编辑'); // $('.el-dialog__title').html('编辑');
...@@ -451,27 +475,34 @@ export default { ...@@ -451,27 +475,34 @@ export default {
this.$confirm("此操作将永久删除, 是否继续?", "提示", { this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}) })
.then(() => { .then(() => {
_this.$https({ _this
method: 'delete', .$https({
url: 'learningContent/delete/'+ row.id, method: "delete",
authType: this.backToken url: "learningContent/delete/" + row.id,
}).then((res) => { authType: this.backToken,
this.$message({type: 'success', message: '删除成功!'}); })
.then(
(res) => {
this.$message({ type: "success", message: "删除成功!" });
_this.Search(); _this.Search();
}, (error) => { },
this.$message({type: 'fail', message: "删除失败!" + error.response.data}); (error) => {
this.$message({
type: "fail",
message: "删除失败!" + error.response.data,
});
} }
) );
}) })
.catch(() => {}); .catch(() => {});
}, },
// 保存编辑信息 // 保存编辑信息
submitForm() { submitForm() {
let _this = this; let _this = this;
_this.$refs.editform.validate(valid => { _this.$refs.editform.validate((valid) => {
if (valid) { if (valid) {
let searchObj = {}; let searchObj = {};
for (let key in _this.editform) { for (let key in _this.editform) {
...@@ -488,16 +519,16 @@ export default { ...@@ -488,16 +519,16 @@ export default {
{ {
url: "menu/edit", url: "menu/edit",
method: "put", method: "put",
authType: this.backToken authType: this.backToken,
}, },
_this.$qs.stringify(searchObj) _this.$qs.stringify(searchObj)
) )
.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.FormVisible = false; _this.FormVisible = false;
...@@ -505,14 +536,14 @@ export default { ...@@ -505,14 +536,14 @@ export default {
} 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,
}); });
} }
); );
...@@ -524,14 +555,14 @@ export default { ...@@ -524,14 +555,14 @@ export default {
handleSelectionChange(selection) { handleSelectionChange(selection) {
let _this = this; let _this = this;
_this.selection = selection; _this.selection = selection;
} },
} },
}; };
</script> </script>
<style lang="less"> <style lang="less">
// @import "../../../../style/common"; // @import "../../../../style/common";
// @import "../../style/list"; // @import "../../style/list";
@import '../../../../style/table.less'; @import "../../../../style/table.less";
@import '../../../../style/pagination.less'; @import "../../../../style/pagination.less";
</style> </style>
<template> <template>
<div class="listPage H100"> <div class="listPage H100">
<div class="search-container"> <div class="search-container">
<el-form :inline="true" :model="form" ref="form" class="search-form" onsubmit="return false;"> <el-form :inline="true" :model="form" ref="form" onsubmit="return false;">
<el-form-item > <el-form-item>
<el-input <el-input
size="mini"
placeholder="请输入学习项目名称" placeholder="请输入学习项目名称"
v-model="form.name" v-model="form.name"
@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"
...@@ -23,14 +22,18 @@ ...@@ -23,14 +22,18 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div class="btn-group"> <div class="btn-group">
<el-button size="mini" type="primary" class="btn_form_search" @click="Search">查询</el-button> <el-button type="primary" class="btn_form_search" @click="Search"
<el-button size="mini" class="btn_form_search" @click="Reset">重置</el-button> >查询</el-button
>
<el-button class="btn_form_search" @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">
...@@ -40,15 +43,22 @@ ...@@ -40,15 +43,22 @@
<div class="party-table"> <div class="party-table">
<el-table <el-table
border border
style="width: 100%;height:100%" height="100%" style="width: 100%; height: 100%"
height="100%"
ref="multipleTable" ref="multipleTable"
:data="tableData" :data="tableData"
@selection-change="handleSelectionChange"
> >
<el-table-column type="index" width="120" label="序号"></el-table-column> <el-table-column
type="index"
width="120"
label="序号"
></el-table-column>
<el-table-column label="学习项目名称" prop="name"></el-table-column> <el-table-column label="学习项目名称" prop="name"></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="learningContentNames"></el-table-column> <el-table-column
label="相关学习内容"
prop="learningContentNames"
></el-table-column>
<el-table-column label="备注" prop="remarks"></el-table-column> <el-table-column 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">
...@@ -64,27 +74,12 @@ ...@@ -64,27 +74,12 @@
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</div> </div>
<!-- <el-button-group>
<el-button
title="删除"
type="text"
size="mini"
@click="handleDelete(scope.row)"
>删除&nbsp;&nbsp;</el-button>
<el-button
title="编辑"
size="mini"
type="text"
@click="openEdit(scope.row)"
>编辑&nbsp;&nbsp;</el-button>
</el-button-group> -->
</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
small
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page.currentPage" :current-page="page.currentPage"
...@@ -95,7 +90,13 @@ ...@@ -95,7 +90,13 @@
</div> </div>
</div> </div>
<!--新增弹框--> <!--新增弹框-->
<el-dialog title="新建" custom-class="party-dialog" width="468px" :visible.sync="FormVisible1" :before-close="close1"> <el-dialog
title="新建"
custom-class="party-dialog"
width="468px"
:visible.sync="FormVisible1"
:before-close="close"
>
<div class="dialog-content"> <div class="dialog-content">
<el-form <el-form
:model="classForm" :model="classForm"
...@@ -115,66 +116,22 @@ ...@@ -115,66 +116,22 @@
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer btn-group"> <div slot="footer" class="dialog-footer btn-group">
<el-button size="mini" v-show="type" type="primary" @click="permisSave">确定</el-button> <el-button size="mini" v-show="type" type="primary" @click="handleSubmit('save')"
<el-button size="mini" v-show="!type" type="primary" @click="permisEdit">确定</el-button> >确定</el-button
<el-button size="mini" @click="close1">取 消</el-button> >
</div> <el-button size="mini" v-show="!type" type="primary" @click="handleSubmit('edit')"
</el-dialog> >确定</el-button
<el-dialog custom-class="party-dialog" title="编辑" width="468px" :visible.sync="FormVisible" :before-close="close" > >
<div class="dialog-content">
<el-form :model="editform" disabled class="party-form" ref="editform" label-width="80px" label-position="right" :rules="rules">
<el-form-item label="审核层级:" :label-width="formLabelWidth">
<el-input
size="small"
v-model="editform.sort"
auto-complete="off"
clearable
></el-input>
</el-form-item>
<el-form-item label="审核时间:" :label-width="formLabelWidth">
<el-input
size="small"
v-model="editform.menuName"
auto-complete="off"
clearable
onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"
></el-input>
</el-form-item>
<el-form-item label="审核结果:" :label-width="formLabelWidth">
<el-input
size="small"
v-model="editform.menuUrl"
auto-complete="off"
clearable
onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"
></el-input>
</el-form-item>
<el-form-item label="驳回原因:" :label-width="formLabelWidth">
<el-input type="textarea" v-model="editform.desc"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer btn-group">
<el-button size="mini" type="primary" @click="submitForm('editform')">确定</el-button>
<el-button size="mini" @click="close">取 消</el-button> <el-button size="mini" @click="close">取 消</el-button>
</div> </div>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
var checkIsNull = (rule, value, callback) => {
if (value) {
if (value.trim() == "") {
callback(new Error("不允许只输入空格"));
} else {
callback();
}
}
};
return { return {
type:true, type: true,
value1: "", value1: "",
page: { currentPage: 1, pageSize: 10, total: 0 }, page: { currentPage: 1, pageSize: 10, total: 0 },
tableData: [], tableData: [],
...@@ -182,19 +139,19 @@ export default { ...@@ -182,19 +139,19 @@ export default {
FormVisible1: false, FormVisible1: false,
formLabelWidth: "100px", formLabelWidth: "100px",
form: { form: {
name: "" name: "",
}, },
editform: { editform: {
menuName: "", menuName: "",
menuUrl: "", menuUrl: "",
parentId: "", parentId: "",
sort: "", sort: "",
id: "" id: "",
}, },
classForm: { classForm: {
id:"", id: "",
name:"", name: "",
remarks:"" remarks: "",
}, },
typeList: [], typeList: [],
rule:{ rule:{
...@@ -203,59 +160,20 @@ export default { ...@@ -203,59 +160,20 @@ export default {
], ],
}, },
rules: { rules: {
sort: [ name: [
{ required: true, message: "请输入顺序值", trigger: "change" }, { required: true, message: "请输入学习项目名称", trigger: "blur" },
{ pattern: /^(\d{1,5})?$/, message: "排序值为低于5位数的纯数字" }
],
menuName: [
{ required: true, message: "请输入菜单名称", trigger: "change" },
{ max: 20, message: "不能超过20个字符", trigger: "change" },
{ validator: checkIsNull, trigger: "blur" }
],
menuUrl: [
{ required: true, message: "请输入菜单地址", trigger: "change" },
{ validator: checkIsNull, trigger: "blur" }
], ],
parentId: [
{ required: true, message: "请输入父级菜单", trigger: "change" }
]
}, },
value: "", value: "",
name: "" name: "",
}; };
}, },
computed: {}, computed: {},
mounted() { mounted() {
this.onSearch(); this.onSearch();
// this.getPermis();
}, },
components: {}, components: {},
methods: { methods: {
// 渲染父级权限
getPermis() {
let vm = this;
vm.$https({
method: "get",
url: "menu/getRoleMenu?roleId=" + sessionStorage.getItem("roleId"),
authType: this.backToken
}).then(
res => {
let data = res.data;
vm.typeList = data.map((e, i) => {
return {
id: e.id,
name:
e.menuName.indexOf("-") == -1
? e.menuName
: e.menuName.split("-")[1]
};
});
},
error => {
console.log(error);
}
);
},
// 获得数据接口 // 获得数据接口
getTableData(param) { getTableData(param) {
let vm = this; let vm = this;
...@@ -263,18 +181,18 @@ export default { ...@@ -263,18 +181,18 @@ export default {
{ {
url: "learningProject/getPageList", url: "learningProject/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);
}); });
}, },
...@@ -296,23 +214,22 @@ export default { ...@@ -296,23 +214,22 @@ export default {
_index: 1, _index: 1,
_size: _this.page.pageSize, _size: _this.page.pageSize,
name: _this.form.name, name: _this.form.name,
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);
}, },
// 重置 // 重置
Reset(){ Reset() {
// this.$refs["form"].resetFields(); this.form = {};
this.form = {} this.Search();
this.Search()
}, },
// // 获取当前查询参数 // // 获取当前查询参数
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]) {
...@@ -324,69 +241,41 @@ export default { ...@@ -324,69 +241,41 @@ export default {
// 添加 // 添加
addPermis() { addPermis() {
// this.$router.push({ path: "videoContentAdd", query: { type: "add" } }); // this.$router.push({ path: "videoContentAdd", query: { type: "add" } });
$('.el-dialog__title').html('新建'); $(".el-dialog__title").html("新建");
this.FormVisible1 = true; this.FormVisible1 = true;
this.type = true this.type = true;
},
// 新建视频分类确认保存
permisSave() {
let _this = this;
_this.$refs.classForm.validate(valid => {
if (valid) {
_this
.$https(
{ url: "learningProject/save", method: "post", authType: this.backToken },
_this.$qs.stringify(_this.classForm)
// _this.classForm
)
.then(
res => {
if (res.data.resultCode == 200 || res.data.resultCode == 201) {
_this.$message({
type: "success",
message: '新建成功!'
});
//跳回用户列表
_this.onSearch();
_this.FormVisible1 = false;
for (let key in _this.classForm) {
_this.classForm[key] = null;
}
_this.$refs["classForm"].resetFields();
} else {
_this.$message({
type: "error",
message: res.data.msg
});
}
}, },
error => { handleSubmit(type) {
_this.$message({ let httpUrl, httpMethod,requestParams;
type: "error", if (type === "save") {
message: error httpUrl = "learningProject/save";
}); httpMethod = "post";
} }
); if (type === "edit") {
httpUrl = "learningProject/update";
httpMethod = "put";
} }
}); requestParams = {...this.classForm}
this.handleSave(httpUrl,httpMethod,requestParams)
}, },
// 编辑视频分类确认保存 handleSave(url,method,requestParams){
permisEdit() {
let _this = this; let _this = this;
_this.$refs.classForm.validate(valid => { _this.$refs.classForm.validate((valid) => {
if (valid) { if (valid) {
_this _this.$https(
.$https( {
{ url: "learningProject/update", method: "put", authType: this.backToken }, url: url,
_this.$qs.stringify(_this.classForm) method: method,
// _this.classForm authType: this.backToken,
},
_this.$qs.stringify(requestParams)
) )
.then( .then(
res => { (res) => {
if (res.data.resultCode == 200 || res.data.resultCode == 201) { if (res.data.resultCode == 200 || res.data.resultCode == 201) {
_this.$message({ _this.$message({
type: "success", type: "success",
message: '修改成功!' message: res.data.message,
}); });
//跳回用户列表 //跳回用户列表
_this.onSearch(); _this.onSearch();
...@@ -398,14 +287,14 @@ export default { ...@@ -398,14 +287,14 @@ export default {
} else { } else {
_this.$message({ _this.$message({
type: "error", type: "error",
message: res.data.msg message: res.data.msg,
}); });
} }
}, },
error => { (error) => {
_this.$message({ _this.$message({
type: "error", type: "error",
message: error message: error,
}); });
} }
); );
...@@ -419,50 +308,33 @@ export default { ...@@ -419,50 +308,33 @@ export default {
this.classForm[key] = null; this.classForm[key] = null;
} }
this.$refs["classForm"].resetFields(); this.$refs["classForm"].resetFields();
// this.FormVisible = false;
// this.$refs["editform"].resetFields();
},
// 新增关闭
close1() {
this.FormVisible1 = false;
for (let key in this.classForm) {
this.classForm[key] = null;
}
this.$refs["classForm"].resetFields();
}, },
// 编辑弹框 // 编辑弹框
openEdit(row) { openEdit(row) {
this.type = false this.type = false;
$('.el-dialog__title').html('编辑'); $(".el-dialog__title").html("编辑");
let _this=this; let _this = this;
//成功之后清除数据
// for (let key in this.editform) {
// _this.editform[key]=null;
// }
// _this.editform= Object.assign({}, row);
_this.FormVisible1 = true; _this.FormVisible1 = true;
this.getAssetTypeInfo(row.id) this.getAssetTypeInfo(row.id);
}, },
// 获取视频分类详情 // 获取视频分类详情
getAssetTypeInfo(id){ getAssetTypeInfo(id) {
let vm = this; let vm = this;
vm.$https( vm.$https(
{ {
url: "learningProject/get/" + id, url: "learningProject/get/" + id,
method: "get", method: "get",
authType: this.backToken authType: this.backToken,
}, }
// param // param
) )
.then(res => { .then((res) => {
let data = res.data.data; let data = res.data.data;
// this.classForm = data this.classForm.id = data.id;
this.classForm.id =data.id this.classForm.name = data.name;
this.classForm.name =data.name this.classForm.remarks = data.remarks;
this.classForm.remarks = data.remarks
}) })
.catch(function(err) { .catch(function (err) {
console.log(err); console.log(err);
}); });
}, },
...@@ -476,139 +348,36 @@ export default { ...@@ -476,139 +348,36 @@ export default {
this.$confirm("此操作将永久删除, 是否继续?", "提示", { this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}) })
.then(() => { .then(() => {
_this.$https({
method: 'delete',
url: 'learningProject/delete/'+ row.id,
authType: this.backToken
}).then((res) => {
this.$message({type: 'success', message: '删除成功!'});
_this.Search();
}, (error) => {
this.$message({type: 'fail', message: "删除失败!" + error.response.data});
}
)
})
.catch(() => {});
},
// // 保存编辑信息
// submitForm() {
// let _this = this;
// _this.$refs.editform.validate(valid => {
// if (valid) {
// let searchObj = {};
// for (let key in _this.editform) {
// if (this.editform[key]) {
// searchObj[key] = _this.editform[key];
// }
// }
// let str = _this.editform.menuName;
// let index = str.lastIndexOf("-");
// str = str.substring(index + 1, str.length);
// searchObj.menuName = str;
// _this
// .$https(
// {
// url: "menu/edit",
// method: "put",
// authType: this.backToken
// },
// _this.$qs.stringify(searchObj)
// )
// .then(
// res => {
// if (res.data.status == 200 || res.data.status == 201) {
// _this.$message({
// type: "success",
// message: res.data.message
// });
// _this.onSearch();
// _this.FormVisible = false;
// _this.$refs["editform"].resetFields();
// } else {
// _this.$message({
// type: "error",
// message: res.data.message
// });
// }
// },
// error => {
// _this.$message({
// type: "error",
// message: error
// });
// }
// );
// }
// });
// },
// 批量操作
handleSelectionChange(selection) {
let _this = this;
_this.selection = selection;
},
getMultipleSelect() {
let _this = this;
let arr = [];
let str = "";
if (_this.selection) {
_this.selection.forEach(function(e) {
arr.push(e.id);
});
str = arr.join(",");
} else {
str = "";
}
return str;
},
// 批量删除
multipleDelete() {
let _this = this;
let str = _this.getMultipleSelect();
if (str) {
this.$confirm("此操作将删除选中菜单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
_this _this
.$https({ .$https({
url: "menu/batchDel?menuIds=" + str, method: "delete",
method: "DELETE", url: "learningProject/delete/" + row.id,
authType: this.backToken authType: this.backToken,
}) })
.then( .then(
res => { (res) => {
if (res.data.status == 201 || res.data.status == 200) { this.$message({ type: "success", message: "删除成功!" });
this.$message({ _this.Search();
type: "success",
message: "删除成功!"
});
}
//重新查询数据
_this.onSearch();
}, },
error => {} (error) => {
);
});
} else {
this.$message({ this.$message({
type: "info", type: "fail",
message: "请至少选择一个选项!" message: "删除失败!" + error.response.data,
}); });
} }
);
})
.catch(() => {});
} }
} }
}; };
</script> </script>
<style lang="less"> <style lang="less">
// @import "../../../../style/common";
// @import "../../style/list";
@import "../../../../style/dialog.less"; @import "../../../../style/dialog.less";
@import '../../../../style/table.less'; @import "../../../../style/table.less";
@import '../../../../style/pagination.less'; @import "../../../../style/pagination.less";
</style> </style>
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
methods: { methods: {
getList() { getList() {
let curTime = getCurDate(); let curTime = getCurDate();
let frequencyDate = curTime.year + curTime.month; let frequencyDate = curTime.year + curTime.month + curTime.date;
this.$https({ this.$https({
method: "post", method: "post",
url: "tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=" + frequencyDate, url: "tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=" + frequencyDate,
......
...@@ -24,13 +24,13 @@ export default { ...@@ -24,13 +24,13 @@ export default {
}, },
components: {}, components: {},
mounted() { mounted() {
this.getList() this.getList();
}, },
methods: { methods: {
getList() { getList() {
let curTime = getCurDate(); let curTime = getCurDate();
let playDate = curTime.year + curTime.month; let playDate = curTime.year + curTime.month + curTime.date;
let _this = this let _this = this;
this.$https({ this.$https({
method: "post", method: "post",
url: "tBoardStatistic/getBoardTrendPageList?playDate=" + playDate, url: "tBoardStatistic/getBoardTrendPageList?playDate=" + playDate,
......
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
_this.$https({ _this.$https({
method: "post", method: "post",
url: url:
"tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=" + "tBoardStatistic/getInteractionPageList?frequencyDate=" +
frequencyDate, frequencyDate,
authType: this.backToken, authType: this.backToken,
}) })
......
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
.$https({ .$https({
method: "post", method: "post",
url: url:
"tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=" + "tBoardStatistic/getBoardPageList?frequencyDate=" +
frequencyDate, frequencyDate,
authType: this.backToken, authType: this.backToken,
}) })
......
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
feildList:[ feildList:[
{prop:'userName',label:'运维账号'}, {prop:'userName',label:'运维账号'},
{prop:'area',label:'运维区域'}, {prop:'area',label:'运维区域'},
{prop:'operationIp',label:'操作Ip'}, {prop:'operationType',label:'操作类型'},
{prop:'createTime',label:'操作时间'} {prop:'createTime',label:'操作时间'}
], ],
list: [], list: [],
......
<template> <template>
<!-- 平台操作日志 --> <!-- 平台操作日志 -->
<div class="platform-log-wrapper height100"> <div class="platform-log-wrapper height100">
<div class="search-container"> <div class="search-container">
<el-form :inline="true" :model="form"> <el-form :inline="true" :model="form">
...@@ -14,20 +14,21 @@ ...@@ -14,20 +14,21 @@
<el-date-picker <el-date-picker
v-model="form.date" v-model="form.date"
type="daterange" type="daterange"
value-format="yyyy-MM-dd"
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>
<el-select <el-select v-model="form.operationType" placeholder="请选择操作类型">
v-model="form.operationType"
placeholder="请选择操作类型">
<el-option <el-option
v-for="(item,index) in operationTypeList" v-for="(item, index) in operationTypeList"
:key="index" :key="index"
:label="item" :label="item"
:value="item"> :value="item"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -40,7 +41,9 @@ ...@@ -40,7 +41,9 @@
</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 hasTabs"> <div class="table-content hasTabs">
...@@ -48,122 +51,122 @@ ...@@ -48,122 +51,122 @@
class="noAdd" class="noAdd"
:currentPage="page._index" :currentPage="page._index"
:feildList="feildList" :feildList="feildList"
:list="list"> :list="list"
>
</party-table> </party-table>
<party-pagination <party-pagination :page="page" @changePage="handleChangeCurrent" />
:page="page"
@changePage="handleChangeCurrent"
/>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { partyPagination,partyTable } from '@/components/index' import { partyPagination, partyTable } from "@/components/index";
import { getLogType } from '@/config/logOperationType.js' import { getLogType } from "@/config/logOperationType.js";
export default { export default {
data(){ data() {
return{ return {
form:{ form: {
nameOrCode:'', nameOrCode: "",
date:'', date: "",
operationType:'', operationType: "",
startDate:'', startDate: "",
endDate:'' endDate: "",
}, },
logType:1, //1.平台操作日志 2.用户操作日志 logType: 1, //1.平台操作日志 2.用户操作日志
operationTypeList:[], operationTypeList: [],
feildList:[ feildList: [
{prop:'operationTime',label:'操作时间'}, { prop: "operationTime", label: "操作时间" },
{prop:'operator',label:'操作者'}, { prop: "operator", label: "操作者" },
{prop:'operationType',label:'操作类型'}, { prop: "operationType", label: "操作类型" },
{prop:'operationObject',label:'操作对象'}, { prop: "operationObject", label: "操作对象" },
{prop:'operationIp',label:'操作Ip'}, { prop: "operationIp", label: "操作Ip" },
], ],
list: [], list: [],
page:{ page: {
_index:1, _index: 1,
_size:10, _size: 10,
total:0 total: 0,
} },
} };
}, },
components:{ partyTable, partyPagination}, components: { partyTable, partyPagination },
mounted(){ mounted() {
// 获取日志操作类型 // 获取日志操作类型
this.getOperationType() this.getOperationType();
// 获取机顶盒运维类表 // 获取机顶盒运维类表
this.getLog() this.getLog();
}, },
methods:{ methods: {
getOperationType(){ getOperationType() {
getLogType().then(res=>{ getLogType().then((res) => {
this.operationTypeList = res this.operationTypeList = res;
}) });
}, },
handleSubmit(){ handleSubmit() {
this.getLog() this.getLog();
}, },
handleReset(){ handleReset() {
for(let key in this.form){ for (let key in this.form) {
this.form[key] = "" this.form[key] = "";
} }
this.getLog() this.getLog();
}, },
getLog(){ getLog() {
let requestParams = {} let requestParams = {};
requestParams._index = this.page._index requestParams._index = this.page._index;
requestParams._size = this.page._size requestParams._size = this.page._size;
requestParams.type = this.logType requestParams.type = this.logType;
if(this.form.nameOrCode){ if (this.form.nameOrCode) {
requestParams.nameOrCode = this.form.nameOrCode requestParams.nameOrCode = this.form.nameOrCode;
} }
if(this.form.operationType){ if (this.form.operationType) {
requestParams.operationType = this.form.operationType requestParams.operationType = this.form.operationType;
} }
if(this.form.date){ if (this.form.date) {
requestParams.startDate = this.form.date[0] requestParams.startDate = this.form.date[0];
requestParams.endDate = this.form.date[1] requestParams.endDate = this.form.date[1];
} }
this.$https({ this.$https(
method:'get', {
url: 'sysLog/querySysLogList', method: "get",
url: "sysLog/querySysLogList",
authType: this.backToken, authType: this.backToken,
},requestParams).then(res=>{ },
if(res.status != 200){ requestParams
this.getResWithOutData() )
}else{ .then((res) => {
if(res.data.resultCode == 200){ if (res.status != 200) {
this.list = res.data.data.records this.getResWithOutData();
this.page._size = res.data.data.size } else {
this.page.total = res.data.data.total if (res.data.resultCode == 200) {
}else{ this.list = res.data.data.records;
this.getResWithOutData() this.page._size = res.data.data.size;
this.page.total = res.data.data.total;
} else {
this.getResWithOutData();
} }
} }
}).catch(err=>{
console.log(err)
}) })
.catch((err) => {
console.log(err);
});
}, },
// 页面返回值为空 // 页面返回值为空
getResWithOutData(){ getResWithOutData() {
this.list = [] this.list = [];
this.page = { this.page = {
_index:1, _index: 1,
_size:10, _size: 10,
total:0 total: 0,
} };
}, },
// 翻页 // 翻页
handleChangeCurrent(val){ handleChangeCurrent(val) {
this.page._index = val this.page._index = val;
this.getLog() this.getLog();
}
}, },
watch:{ },
watch: {},
} };
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>
\ No newline at end of file
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
<div class="search-container"> <div class="search-container">
<el-form :inline="true" :model="form"> <el-form :inline="true" :model="form">
<el-form-item> <el-form-item>
<el-select v-model="form.user" placeholder="请选择"> <el-select v-model="form.user" placeholder="请选择所属单位">
<el-option <el-option
v-model="form.organId" v-model="form.organId"
v-for="item in organList" v-for="item in organList"
:key="item.id" :key="item.id"
:label="item.orgName" :label="item.name"
:value="item.id"> :value="item.id"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -19,8 +20,10 @@ ...@@ -19,8 +20,10 @@
v-model="form.date" v-model="form.date"
type="daterange" type="daterange"
range-separator="至" range-separator="至"
value-format="yyyy-MM-dd"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
...@@ -33,7 +36,9 @@ ...@@ -33,7 +36,9 @@
</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 hasTabs"> <div class="table-content hasTabs">
...@@ -41,116 +46,120 @@ ...@@ -41,116 +46,120 @@
class="noAdd" class="noAdd"
:currentPage="page._index" :currentPage="page._index"
:feildList="feildList" :feildList="feildList"
:list="list"> :list="list"
>
</party-table> </party-table>
<party-pagination <party-pagination :page="page" @changePage="handleChangeCurrent" />
:page="page"
@changePage="handleChangeCurrent"
/>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { partyPagination,partyTable } from '@/components/index' import { partyPagination, partyTable } from "@/components/index";
import { getOrgListWithOutPage } from "@/config/organ.js" import { getOrgListWithOutPage } from "@/config/organ.js";
export default { export default {
data(){ data() {
return{ return {
form:{ form: {
organId:'', organId: "",
date:'', date: "",
startDate:'', startDate: "",
endDate:'' endDate: "",
}, },
organList:[], organList: [],
feildList:[ feildList: [
{prop:'macAddr',label:'机顶盒Mac地址'}, { prop: "macAddr", label: "机顶盒Mac地址" },
{prop:'orgName',label:'所属单位'}, { prop: "orgName", label: "所属单位" },
{prop:'learnName',label:'学习内容'}, { prop: "learnName", label: "学习内容" },
{prop:'startTime',label:'开始时间'}, { prop: "startTime", label: "开始时间" },
{prop:'endTime',label:'结束时间'} { prop: "endTime", label: "结束时间" },
], ],
list: [], list: [],
page:{ page: {
_index:1, _index: 1,
_size:10, _size: 10,
total:0 total: 0,
} },
} };
}, },
components:{ partyTable, partyPagination}, components: { partyTable, partyPagination },
mounted(){ mounted() {
// 获取所属范围列表 // 获取所属范围列表
this.getOrgList() this.getOrgList();
// 获取机顶盒运维类表 // 获取机顶盒运维类表
this.getLog() this.getFirstPageList();
}, },
methods:{ methods: {
getOrgList(){ getOrgList() {
getOrgListWithOutPage().then(res=>{ getOrgListWithOutPage().then((res) => {
this.organList = res this.organList = res;
}) });
},
getFirstPageList() {
this.page._index = 1;
this.getPageList();
}, },
handleSubmit(){ handleSubmit() {
this.getLog() this.getPageList();
}, },
handleReset(){ handleReset() {
for(let key in this.form){ for (let key in this.form) {
this.form[key] = "" this.form[key] = "";
} }
this.getLog() this.getFirstPageList();
}, },
getLog(){ getPageList() {
let requestParams = {} let requestParams = {};
requestParams._index = this.page._index requestParams._index = this.page._index;
requestParams._size = this.page._size requestParams._size = this.page._size;
if(this.form.organId){ if (this.form.organId) {
requestParams.organId = this.form.organId requestParams.organId = this.form.organId;
} }
if(this.form.date){ if (this.form.date) {
requestParams.startDate = this.form.date[0] requestParams.startDate = this.form.date[0];
requestParams.endDate = this.form.date[1] requestParams.endDate = this.form.date[1];
} }
this.$https({ this.$https(
method:'get', {
url: 'sysLog/runLogList', method: "get",
url: "sysLog/runLogList",
authType: this.backToken, authType: this.backToken,
},requestParams).then(res=>{ },
if(res.status != 200){ requestParams
this.getResWithOutData() )
}else{ .then((res) => {
if(res.data.resultCode == 200){ if (res.status != 200) {
this.list = res.data.data.records this.getResWithOutData();
this.page._size = res.data.data.size } else {
this.page.total = res.data.data.total if (res.data.resultCode == 200) {
}else{ this.list = res.data.data.records;
this.getResWithOutData() this.page._size = res.data.data.size;
this.page.total = res.data.data.total;
} else {
this.getResWithOutData();
} }
} }
}).catch(err=>{
console.log(err)
}) })
.catch((err) => {
console.log(err);
});
}, },
// 页面返回值为空 // 页面返回值为空
getResWithOutData(){ getResWithOutData() {
this.list = [] this.list = [];
this.page = { this.page = {
_index:1, _index: 1,
_size:10, _size: 10,
total:0 total: 0,
} };
}, },
// 翻页 // 翻页
handleChangeCurrent(val){ handleChangeCurrent(val) {
this.page._index = val this.page._index = val;
this.getLog() this.getPageList();
}
}, },
watch:{ },
watch: {},
} };
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>
\ No newline at end of file
<template> <template>
<!-- 用户操作日志 --> <!-- 用户操作日志 -->
<div class="platform-log-wrapper height100"> <div class="platform-log-wrapper height100">
<div class="search-container"> <div class="search-container">
<el-form :inline="true" :model="form"> <el-form :inline="true" :model="form">
...@@ -8,26 +8,33 @@ ...@@ -8,26 +8,33 @@
v-model="form.nameOrCode" v-model="form.nameOrCode"
placeholder="请输入操作者" placeholder="请输入操作者"
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-date-picker <el-date-picker
v-model="form.date" v-model="form.date"
type="daterange" type="daterange"
value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期"
clearable
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select <el-select
clearable
v-model="form.operationType" v-model="form.operationType"
placeholder="请选择操作类型"> placeholder="请选择操作类型"
>
<el-option <el-option
v-for="(item,index) in operationTypeList" v-for="(item, index) in operationTypeList"
:key="index" :key="index"
:label="item" :label="item"
:value="item"> :value="item"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -40,7 +47,9 @@ ...@@ -40,7 +47,9 @@
</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 hasTabs"> <div class="table-content hasTabs">
...@@ -48,122 +57,126 @@ ...@@ -48,122 +57,126 @@
class="noAdd" class="noAdd"
:currentPage="page._index" :currentPage="page._index"
:feildList="feildList" :feildList="feildList"
:list="list"> :list="list"
>
</party-table> </party-table>
<party-pagination <party-pagination :page="page" @changePage="handleChangeCurrent" />
:page="page"
@changePage="handleChangeCurrent"
/>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { partyPagination,partyTable } from '@/components/index' import { partyPagination, partyTable } from "@/components/index";
import { getLogType } from '@/config/logOperationType.js' import { getLogType } from "@/config/logOperationType.js";
export default { export default {
data(){ data() {
return{ return {
form:{ form: {
nameOrCode:'', nameOrCode: "",
date:'', date: "",
operationType:'', operationType: "",
startDate:'', startDate: "",
endDate:'' endDate: "",
}, },
logType:2, //1.平台操作日志 2.用户操作日志 logType: 2, //1.平台操作日志 2.用户操作日志
operationTypeList:[], operationTypeList: [],
feildList:[ feildList: [
{prop:'operationTime',label:'操作时间'}, { prop: "operationTime", label: "操作时间" },
{prop:'operator',label:'操作者'}, { prop: "operator", label: "操作者" },
{prop:'operationType',label:'操作类型'}, { prop: "operationType", label: "操作类型" },
{prop:'operationObject',label:'操作对象'}, { prop: "operationObject", label: "操作对象" },
{prop:'operationIp',label:'操作Ip'}, { prop: "operationIp", label: "操作Ip" },
], ],
list: [], list: [],
page:{ page: {
_index:1, _index: 1,
_size:10, _size: 10,
total:0 total: 0,
} },
} };
}, },
components:{ partyTable, partyPagination}, components: { partyTable, partyPagination },
mounted(){ mounted() {
// 获取日志操作类型 // 获取日志操作类型
this.getOperationType() this.getOperationType();
// 获取机顶盒运维类表 // 获取机顶盒运维类表
this.getLog() this.getFirstPageList();
}, },
methods:{ methods: {
getOperationType(){ getFirstPageList() {
getLogType().then(res=>{ this.page._index = 1;
this.operationTypeList = res this.getPageList();
}) },
getOperationType() {
getLogType().then((res) => {
this.operationTypeList = res;
});
}, },
handleSubmit(){ handleSubmit() {
this.getLog() this.getPageList();
}, },
handleReset(){ handleReset() {
for(let key in this.form){ for (let key in this.form) {
this.form[key] = "" this.form[key] = "";
} }
this.getLog() this.getFirstPageList();
}, },
getLog(){ getPageList() {
let requestParams = {} let requestParams = {};
requestParams._index = this.page._index requestParams._index = this.page._index;
requestParams._size = this.page._size requestParams._size = this.page._size;
requestParams.type = this.logType requestParams.type = this.logType;
if(this.form.nameOrCode){ if (this.form.nameOrCode) {
requestParams.nameOrCode = this.form.nameOrCode requestParams.nameOrCode = this.form.nameOrCode;
} }
if(this.form.operationType){ if (this.form.operationType) {
requestParams.operationType = this.form.operationType requestParams.operationType = this.form.operationType;
} }
if(this.form.date){ if (this.form.date) {
requestParams.startDate = this.form.date[0] requestParams.startDate = this.form.date[0];
requestParams.endDate = this.form.date[1] requestParams.endDate = this.form.date[1];
} }
this.$https({ this.$https(
method:'get', {
url: 'sysLog/querySysLogList', method: "get",
url: "sysLog/querySysLogList",
authType: this.backToken, authType: this.backToken,
},requestParams).then(res=>{ },
if(res.status != 200){ requestParams
this.getResWithOutData() )
}else{ .then((res) => {
if(res.data.resultCode == 200){ if (res.status != 200) {
this.list = res.data.data.records this.getResWithOutData();
this.page._size = res.data.data.size } else {
this.page.total = res.data.data.total if (res.data.resultCode == 200) {
}else{ this.list = res.data.data.records;
this.getResWithOutData() this.page._size = res.data.data.size;
this.page.total = res.data.data.total;
} else {
this.getResWithOutData();
} }
} }
}).catch(err=>{
console.log(err)
}) })
.catch((err) => {
console.log(err);
});
}, },
// 页面返回值为空 // 页面返回值为空
getResWithOutData(){ getResWithOutData() {
this.list = [] this.list = [];
this.page = { this.page = {
_index:1, _index: 1,
_size:10, _size: 10,
total:0 total: 0,
} };
}, },
// 翻页 // 翻页
handleChangeCurrent(val){ handleChangeCurrent(val) {
this.page._index = val this.page._index = val;
this.getLog() this.getPageList();
}
}, },
watch:{ },
watch: {},
} };
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>
\ No newline at end of file
...@@ -356,11 +356,11 @@ const router = new Router({ ...@@ -356,11 +356,11 @@ const router = new Router({
// --学习 // --学习
{ {
path: '/learnProject', path: '/learnProject',
name: '学习项目制作', name: '学习项目管理',
component: () => import('@/page/content/learn/project/index'), component: () => import('@/page/content/learn/project/index'),
meta: { meta: {
showBreadcrumb: true, showBreadcrumb: true,
title: '学习项目制作', title: '学习项目管理',
} }
}, },
{ {
......
...@@ -389,7 +389,6 @@ ...@@ -389,7 +389,6 @@
} }
.info-wrapper { .info-wrapper {
height: 100%;
width: 640px; width: 640px;
margin: 0 auto; margin: 0 auto;
background: #fff; background: #fff;
...@@ -412,6 +411,7 @@ ...@@ -412,6 +411,7 @@
height: calc(100% - 156px); height: calc(100% - 156px);
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
padding: 20px 0;
} }
.info-footer { .info-footer {
......
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