Commit 0bfde0c8 authored by xulili's avatar xulili

学习制作

parent 4529986f
......@@ -13,6 +13,7 @@ module.exports = {
proxyTable: {
'/mall': {
target: "http://192.168.110.67/mall",
// target: "http://192.168.204.66:8088/mall",
changeOrigin: true,
pathRewrite: {
'^/mall': '/' // 重写接口
......
let statusOption = [
{ label: "活跃", value: 'ENABLE' },
{ label: "禁用", value: 'DISABLE' },
{ label: "待审核", value: 'TBC' },
]
export {
statusOption
}
\ No newline at end of file
......@@ -22,12 +22,20 @@
<template slot-scope="scope">
<div v-if="item.isEdit" class="table-btn-group">
<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>
</el-button>
</el-tooltip>
<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>
</el-button>
</el-tooltip>
......
......@@ -128,7 +128,7 @@ export default {
}
},
// 翻页
handleChangeCurrent() {
handleChangeCurrent(val) {
this.page._index = val;
this.getPageList();
},
......
......@@ -206,7 +206,7 @@ export default {
});
},
// 翻页
handleChangeCurrent() {
handleChangeCurrent(val) {
this.page._index = val;
this.getPageList();
},
......
......@@ -8,6 +8,7 @@
v-model="form.userName"
placeholder="请输入用户名"
suffix-icon="el-icon-search"
clearable
></el-input>
</el-form-item>
<el-form-item>
......@@ -59,6 +60,7 @@ import { partyPagination } from "@/components/index";
import accountTable from "./components/accountTable";
import { addDialog, editDialog } from "./statisticalDialog/index";
import msgDialog from "./msgDialog.vue";
import { statusOption } from "@/config/account";
export default {
data() {
return {
......@@ -67,11 +69,7 @@ export default {
status: "",
type: 5, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号 5. 统计账号
},
statusOption: [
{ label: "活跃", value: 1 },
{ label: "禁用", value: 2 },
{ label: "待审核", value: 3 },
],
statusOption: statusOption,
feildList: [
{ prop: "userName", label: "统计用户名" },
{ prop: "orgName", label: "所属单位" },
......@@ -270,7 +268,7 @@ export default {
}
},
// 翻页
handleChangeCurrent() {
handleChangeCurrent(val) {
this.page._index = val;
this.getPageList();
},
......
......@@ -5,13 +5,18 @@
<el-form :inline="true" :model="form">
<el-form-item>
<el-input
clearable
v-model="form.userName"
placeholder="请输入运维人员姓名"
suffix-icon="el-icon-search"
></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="form.status" placeholder="请选择账号状态">
<el-select
v-model="form.status"
placeholder="请选择账号状态"
clearable
>
<el-option
v-for="(item, index) in statusOption"
:key="index"
......@@ -56,6 +61,7 @@ import { partyPagination } from "@/components/index";
import accountTable from "./components/accountTable";
import { addDialog, editDialog } from "./stbDialog/index";
import msgDialog from "./msgDialog.vue";
import { statusOption } from "@/config/account";
export default {
data() {
return {
......@@ -64,11 +70,7 @@ export default {
status: "",
type: 4, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号
},
statusOption: [
{ label: "活跃", value: 1 },
{ label: "禁用", value: 2 },
{ label: "待审核", value: 3 },
],
statusOption: statusOption,
feildList: [
{ prop: "userName", label: "运维人员姓名" },
{ prop: "orgName", label: "运维区域" },
......@@ -258,7 +260,7 @@ export default {
}
},
// 翻页
handleChangeCurrent() {
handleChangeCurrent(val) {
this.page._index = val;
this.getPageList();
},
......
......@@ -315,7 +315,7 @@ export default {
}
},
// 翻页
handleChangeCurrent() {
handleChangeCurrent(val) {
this.page._index = val;
this.getPageList();
},
......
......@@ -50,7 +50,7 @@ export default {
return {
form: {
userName: "",
type: 1, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号 5. 统计账号
type: 1, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号 5. 统计账号
},
feildList: [
{ prop: "userName", label: "平台用户名" },
......@@ -90,7 +90,7 @@ export default {
},
handleReset() {
this.form.userName = "";
this.getFirstPageList();
this.getFirstPageList();
},
getPageList() {
let requestParams = {};
......@@ -131,9 +131,9 @@ export default {
},
// 编辑
handleEdit() {
this.$refs.editDialog.id = this.activeRow.id
this.$refs.editDialog.getDetailById()
this.$refs.editDialog.dialogVisible = true;
this.$refs.editDialog.id = this.activeRow.id;
this.$refs.editDialog.getDetailById();
this.$refs.editDialog.dialogVisible = true;
},
// 重置密码
handleResetPwd() {
......@@ -238,7 +238,7 @@ export default {
}
},
// 翻页
handleChangeCurrent() {
handleChangeCurrent(val) {
this.page._index = val;
this.getPageList();
},
......
......@@ -3,10 +3,9 @@
<el-dialog
custom-class="party-dialog"
title="视频详情"
width="80%"
width="900px"
:visible.sync="dialogVisible"
:before-close="close"
>
<div>
<!--
......@@ -15,9 +14,16 @@
</video>
<button @click="playClick" :class="{hide: isPlay}">点击播放</button> -->
<!--class="video-js vjs-default-skin vjs-big-play-centered" -->
<video :preload="preload"
:poster="videoImg" :height="height" :width="width" align="center" :controls="controls" :autoplay="autoplay">
<source :src="videoSrc" type="video/mp4">
<video
:preload="preload"
:poster="videoImg"
:height="height"
:width="width"
align="center"
:controls="controls"
:autoplay="autoplay"
>
<source :src="videoSrc" type="video/mp4" />
</video>
</div>
<!-- <div slot="footer" class="dialog-footer btn-group">
......@@ -30,29 +36,28 @@
export default {
data() {
return {
dialogVisible:false,
videoSrc: 'https://video.pearvideo.com/mp4/short/20200209/cont-1650197-14888002-hd.mp4',
videoImg: 'https://sm.ms/image/ueRFCZfk2xTONGb',
playStatus: '',
muteStatus: '',
dialogVisible: false,
// videoSrc: 'https://video.pearvideo.com/mp4/short/20200209/cont-1650197-14888002-hd.mp4',
// videoImg: 'https://sm.ms/image/ueRFCZfk2xTONGb',
videoSrc: "",
videoImg: "",
playStatus: "",
muteStatus: "",
isMute: true,
isPlay: false,
width: '820', // 设置视频播放器的显示宽度(以像素为单位)
height: '500', // 设置视频播放器的显示高度(以像素为单位)
preload: 'auto', // 建议浏览器是否应在<video>加载元素后立即开始下载视频数据。
width: "820", // 设置视频播放器的显示宽度(以像素为单位)
height: "500", // 设置视频播放器的显示高度(以像素为单位)
preload: "auto", // 建议浏览器是否应在<video>加载元素后立即开始下载视频数据。
controls: true, // 确定播放器是否具有用户可以与之交互的控件。没有控件,启动视频播放的唯一方法是使用autoplay属性或通过Player API。
autoplay: ''
}
autoplay: "",
};
},
methods: {
// 新增关闭
close() {
this.dialogVisible = false;
},
}
},
};
</script>
......
......@@ -7,6 +7,8 @@
:on-remove="handleRemove"
:on-success="handleAvatarSuccess"
:headers="headers"
:file-list="fileList"
accept=""
>
<i class="el-icon-plus"></i>
</el-upload>
......@@ -21,34 +23,53 @@ export default {
data() {
return {
dialogImageUrl: "",
dialogVisible: false
dialogVisible: false,
fileList: [
{
name: "",
url: "",
},
],
};
},
computed: {
computed: {
headers() {
// return { 'token': this.backToken }
}
return {
Authorization: localStorage.getItem("backToken") || "",
};
},
},
methods: {
// 图片上传成功的返回值
handleAvatarSuccess(res, file) {
console.log(res)
console.log(res.data.url)
this.$emit('imgUrl', res.data.url)
// console.log(data.fileList[0].url)
// this.imageUrl = URL.createObjectURL(file.raw);
if (res.resultCode == 200) {
this.$emit("imgUrl", res.data.url);
this.imageUrl = res.data.url;
} else {
this.$message.error(res.message);
}
},
handleRemove(file, fileList) {
console.log(file, fileList);
this.$emit("imgUrl", "");
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
}
}
},
showImg(cover) {
let file = {
name: "",
url: cover,
};
this.fileList = [file]
},
},
};
</script>
<style>
.avatar {
width: 100%;
height: 100%;
}
</style>
<template>
<div>
<!--
<div>
<!--
<video :src="videoSrc" :poster="videoImg" :autoplay="playStatus" height="421" width="700" :muted="muteStatus">
your browser does not support the video tag
</video>
<button @click="playClick" :class="{hide: isPlay}">点击播放</button> -->
<!--class="video-js vjs-default-skin vjs-big-play-centered" -->
<video :preload="preload"
:poster="videoImg" :height="height" :width="width" align="center" :controls="controls" :autoplay="autoplay">
<source :src="videoSrc" type="video/mp4">
</video>
</div>
<!--class="video-js vjs-default-skin vjs-big-play-centered" -->
<video
:preload="preload"
:poster="videoImg"
:height="height"
:width="width"
align="center"
:controls="controls"
:autoplay="autoplay"
>
<source :src="videoSrc" type="video/mp4" />
</video>
</div>
</template>
<script>
export default {
name: 'Video',
data () {
name: "Video",
data() {
return {
videoSrc: 'https://video.pearvideo.com/mp4/short/20200209/cont-1650197-14888002-hd.mp4',
videoImg: 'https://sm.ms/image/ueRFCZfk2xTONGb',
playStatus: '',
muteStatus: '',
videoSrc:
"https://video.pearvideo.com/mp4/short/20200209/cont-1650197-14888002-hd.mp4",
videoImg: "https://sm.ms/image/ueRFCZfk2xTONGb",
playStatus: "",
muteStatus: "",
isMute: true,
isPlay: false,
width: '820', // 设置视频播放器的显示宽度(以像素为单位)
height: '500', // 设置视频播放器的显示高度(以像素为单位)
preload: 'auto', // 建议浏览器是否应在<video>加载元素后立即开始下载视频数据。
width: "820", // 设置视频播放器的显示宽度(以像素为单位)
height: "500", // 设置视频播放器的显示高度(以像素为单位)
preload: "auto", // 建议浏览器是否应在<video>加载元素后立即开始下载视频数据。
controls: true, // 确定播放器是否具有用户可以与之交互的控件。没有控件,启动视频播放的唯一方法是使用autoplay属性或通过Player API。
autoplay: ''
}
}
autoplay: "",
};
},
// 自动播放属性,muted:静音播放
// autoplay: 'muted',
}
};
</script>
<style scoped >
</style>
<template>
<div class="info">
<!-- <audio-play></audio-play> -->
<video-dialog ref="videoDialog"></video-dialog>
<div class="info-header">新建学习内容</div>
<div class="info-container">
<div class="info-wrapper">
<el-form :model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="140px"
class="demo-form-inline party-form"
:inline="true"
label-position="top">
<el-form-item label="学习内容名称" prop="name" class="w50" style="padding-right:100px;">
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="140px"
class="demo-form-inline party-form"
:inline="true"
label-position="top"
>
<el-form-item
label="学习内容名称"
prop="name"
class="w50"
style="padding-right: 100px"
>
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
<el-form-item label="适用范围" >
<el-form-item label="适用范围">
<!-- 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 label="所属学习项目" class="w50">
<el-select
placeholder="请选所属学习项目"
@focus="getLearnProject"
v-model="ruleForm.learningProjectId"
>
<el-option
v-for="item in learningProjectIdList"
:label="item.name"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label="所属学习项目"
class="w50"
prop="learningProjectId"
>
<el-select
placeholder="请选所属学习项目"
v-model="ruleForm.learningProjectId"
>
<el-option
v-for="item in learningProjectIdList"
:label="item.name"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="学习内容宣传图" prop="cover" class="w100">
<!-- <img class="imgSize" src alt /> -->
<upload-img @imgUrl="imgUrl"></upload-img>
<upload-img ref="uploadImg" @imgUrl="imgUrl"></upload-img>
</el-form-item>
<el-form-item class="selectH100 w50" label="展板类别" prop="exhibitionBoardCatIdList">
<el-form-item
class="w50"
label="展板类别"
prop="exhibitionBoardCatIdList"
>
<el-select
placeholder="请选择展板类别"
@focus="getAssetTypeData"
multiple
v-model="ruleForm.exhibitionBoardCatIdList"
@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
v-for="item in videoContentCat"
:label="item.name"
......@@ -60,15 +70,19 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item class="selectH100" label="版权方" prop="copyrightOwnerIdList">
<el-form-item label="版权方" prop="copyrightOwnerIdList">
<el-select
placeholder="请选择版权方"
@focus="getAssetTypeData2"
multiple
v-model="ruleForm.copyrightOwnerIdList"
@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
v-for="item in assetType2"
:label="item.name"
......@@ -77,41 +91,60 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="展板备选清单" class="w100"></el-form-item>
<el-form-item
label="展板备选清单"
class="w100"
prop="exhibitionBoardIdList"
>
<el-table
border
@selection-change="handleSelectionChange"
style="width: 100%"
max-height="400"
ref="multipleTable"
: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
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">
<template slot-scope="scope">
<el-button
type="text"
style="padding: 0"
@click="videoPreview(scope.row)"
>视频预览</el-button
>
<el-button
type="text"
style="padding: 0"
@click="displayPreview(scope.row)"
>展板预览</el-button
>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form>
<div class>
<!-- {{multipleSelection}} -->
<!-- {{ruleForm.exhibitionBoardIdList}} -->
<el-table
border
@selection-change="handleSelectionChange"
style="width: 100%;height:300px;overflow:auto;"
height="100%"
ref="multipleTable"
: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 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">
<template slot-scope="scope">
<el-button
type="text"
style="padding:0"
@click="videoPreview(scope.row)"
>视频预览</el-button>
<el-button
type="text"
style="padding:0"
@click="displayPreview(scope.row)"
>展板预览</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!--新增弹框-->
<!--新增弹框-->
<el-dialog
custom-class="party-dialog"
title="展板预览区"
......@@ -130,206 +163,315 @@
class="party-form"
>
<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 label="版权方">
<el-input v-model="classForm.name"></el-input>
<el-input
v-model="classForm.boardCopyrightOwnerName"
readonly
></el-input>
</el-form-item>
<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 label="展板宣传图">
<img class="imgSize" :src="classForm.cover" alt="">
<img class="imgSize" :src="classForm.cover" alt="" />
</el-form-item>
<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>
</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>
</div>
</div>
<div class="info-footer">
<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 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>
<el-button
v-show="type === 'add'"
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>
</template>
<script>
import uploadImg from '@/page/content/components/uploadVue/uploadImg'
import videoDialog from '@/page/content/components/dialog/videoDialog'
import audioPlay from '@/page/content/components/audioPlay'
import uploadImg from "@/page/content/components/uploadVue/uploadImg";
import videoDialog from "@/page/content/components/dialog/videoDialog";
import audioPlay from "@/page/content/components/audioPlay";
export default {
components:{
components: {
uploadImg,
videoDialog,
audioPlay
audioPlay,
},
data() {
return {
dialogVisible: false,
classForm: {},
type: this.$route.query.type,
learningProjectIdList:'',
learningProjectIdList: "",
videoContentCat: [],
assetType2:[],
assetType2: [], // 版权方列表
checkedThing: false,
checkedThing2:false,
checkedThing2: false,
selfstyle: {
textAlign: "right",
width: "100%",
paddingRight: "10px"
paddingRight: "10px",
},
tableData: [],
ruleForm: {
applicableScope :"ALL_PLAT",
exhibitionBoardIdList:[]
},rules: {
name: "", //学习内容名称
applicableScope: "ALL_PLAT", //适用范围
cover: "", //宣传图
learningProjectId: "", //所属学习项目
exhibitionBoardCatIdList: [], //展板类别
copyrightOwnerIdList: [], //版权方
exhibitionBoardIdList: [], // 展板备选
},
rules: {
name: [
{ required: true, message: "请输入版权方名称", trigger: "blur" }
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
{ required: true, message: "请输入学习内容名称", trigger: "blur" },
],
date1: [
cover: [
{
type: "date",
required: true,
message: "请选择日期",
trigger: "change"
}
message: "请选择学习内容宣传图",
},
],
date2: [
learningProjectId: [
{ required: true, message: "请选择所属学习项目", trigger: "change" },
],
exhibitionBoardCatIdList: [
{
type: "date",
required: true,
message: "请选择时间",
trigger: "change"
}
type: "array",
message: "请选择展板类别",
trigger: "change",
},
],
copyrightOwnerIdList: [
{
required: true,
type: "array",
message: "请选择版权方",
trigger: "change",
},
],
exhibitionBoardIdList: [
{
required: true,
type: "array",
message: "请选择展板",
trigger: "change",
},
],
},
multipleSelection:[]
multipleSelection: [],
};
},
mounted(){
this.init()
mounted() {
this.init();
},
methods: {
// 视频预览
videoPreview(row){
// alert("视频")
// console.log(row,'222')
this.$refs.videoDialog.dialogVisible = true
this.$refs.videoDialog.videoImg = row.cover
this.$refs.videoDialog.videoSrc = row.videoList[0].fileUrl
videoPreview(row) {
this.$refs.videoDialog.dialogVisible = true;
this.$refs.videoDialog.videoImg = row.cover;
let videoList0 = row.videoList[0];
this.$refs.videoDialog.videoSrc = videoList0 ? videoList0.fileUrl : "";
},
// 展板预览
// 展板预览
displayPreview(row) {
this.dialogVisible = true;
this.classForm =row
this.classForm = row;
},
// 关闭弹窗
closeDialog(){
closeDialog() {
this.dialogVisible = false;
},
init() {
init() {
this.getLearnProject();
this.getAssetTypeData();
this.getAssetTypeData2();
if (this.$route.query.type === "Update") {
this.getInfo(this.$route.query.id);
this.getLearnProject()
this.getAssetTypeData()
this.getAssetTypeData2()
// this.getLearnContentBoard()
}
},
// 获取版权方详情
getInfo(id) {
let vm = this;
vm.$https({
url: "learningContent/get/" + id,
method: "get",
authType: this.backToken,
})
.then((res) => {
let data = res.data.data;
this.ruleForm = data;
this.ruleForm = {
name: data.name,
applicableScope: data.applicableScope,
copyrightOwnerIdList: data.copyrightOwnerIdList,
cover: data.cover,
learningProjectId: data.learningProjectId,
exhibitionBoardCatIdList: data.exhibitionBoardCatIdList,
id: data.id,
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;
}
let _this = this;
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) {
console.log(err);
});
},
// 获取版权方列表
getAssetTypeData2() {
let vm = this;
vm.$https(
{
url: "learningContent/get/" + id,
url: "copyrightOwner/getList",
method: "get",
authType: this.backToken
}
// param
authType: this.backToken,
},
{ copyrightOwnerType: "EXHIBITION_BOARD" }
)
.then(res => {
.then((res) => {
let data = res.data.data;
this.ruleForm = data;
console.log(this.ruleForm)
this.ruleForm = {
name :data.name,
applicableScope:data.applicableScope,
copyrightOwnerIdList:data.copyrightOwnerIdList,
cover:data.cover,
learningProjectId:data.learningProjectId,
exhibitionBoardCatIdList:data.exhibitionBoardCatIdList,
id:data.id,
exhibitionBoardIdList:data.exhibitionBoardIdList,
}
this.tableData = data.exhibitionBoardList
this.multipleSelection = data.exhibitionBoardList
vm.assetType2 = data;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
// 获取获取学习内容展板全部列表
getLearnContentBoard(){
// 获取学习项目列表
getLearnProject() {
let vm = this;
vm.$https({
url: "learningContentBoard/getList",
url: "learningProject/getList",
method: "get",
authType: this.backToken
},
{learningContentId:this.$route.query.id}
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",
method: "get",
authType: this.backToken,
},
{ learningContentId: this.$route.query.id }
)
.then(res => {
.then((res) => {
let data = res.data.data;
console.log(data)
// this.tableData = data
// this.multipleSelection = data
console.log(data);
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
// 多选赋值
handleSelectionChange(val) {
this.multipleSelection = val;
// this.ruleForm.exhibitionBoardIdList = val
let newArray = val.map((item) => {
return item.id;
})
this.ruleForm.exhibitionBoardIdList = newArray
this.multipleSelection = val;
let newArray = val.map((item) => {
return item.id;
});
this.ruleForm.exhibitionBoardIdList = newArray;
},
// 新增
// 新增
submitForm(formName) {
this.$refs[formName].validate(valid => {
console.log(this.ruleForm)
this.$refs[formName].validate((valid) => {
console.log(this.ruleForm);
if (valid) {
this.$https(
{
url: "/learningContent/save",
method: "post",
authType: this.backToken
authType: this.backToken,
},
// this.ruleForm
this.$qs.stringify(this.ruleForm)
)
.then(res => {
.then((res) => {
this.$message({ type: "success", message: "新增成功!" });
history.go(-1);
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
} else {
......@@ -340,22 +482,22 @@ export default {
},
// 修改版权方
updateForm(formName) {
this.$refs[formName].validate(valid => {
this.$refs[formName].validate((valid) => {
if (valid) {
this.$https(
{
url: "learningContent/update",
method: "put",
authType: this.backToken
authType: this.backToken,
},
this.$qs.stringify(this.ruleForm)
// this.ruleForm
)
.then(res => {
.then((res) => {
this.$message({ type: "success", message: "修改成功!" });
history.go(-1);
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
} else {
......@@ -364,27 +506,10 @@ export default {
}
});
},
// 获取学习项目列表
getLearnProject(){
let vm = this;
vm.$https({
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
imgUrl(url) {
this.ruleForm.cover = url;
this.$refs.ruleForm.validateField("cover");
},
getSelectDep(exhibitionBoardCatIdList) {
if (exhibitionBoardCatIdList.length === this.videoContentCat.length) {
......@@ -394,40 +519,40 @@ export default {
}
},
//
getSelectDep2(exhibitionBoardCatIdList) {
getSelectDep2(exhibitionBoardCatIdList) {
if (exhibitionBoardCatIdList.length === this.assetType2.length) {
this.checkedThing2 = true;
} else {
this.checkedThing2 = false;
}
console.log(this.ruleForm.exhibitionBoardCatIdList,"分类")
console.log(this.ruleForm.copyrightOwnerIdList,"展板")
const param = {
boardCopyrightOwnerIdList: this.ruleForm.copyrightOwnerIdList,
exhibitionBoardCatIdList: this.ruleForm.exhibitionBoardCatIdList
}
this.getTableData(param)
exhibitionBoardCatIdList: this.ruleForm.exhibitionBoardCatIdList,
};
this.getTableData(param);
},
// 根据展板类别,版权方获取展板备选清单
getTableData(param) {
getTableData(param, type) {
let vm = this;
vm.$https(
{
url: "exhibitionBoard/getList",
method: "get",
authType: this.backToken
authType: this.backToken,
},
vm.$qs.stringify(param)
// param
)
.then(res => {
.then((res) => {
let data = res.data.data;
console.log(data)
vm.tableData = data;
if (type) {
// 选中表格数据
setTimeout(() => {
vm.setSelctTable();
}, 1000);
}
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
......@@ -436,61 +561,25 @@ export default {
// debugger
this.ruleForm.exhibitionBoardCatIdList = [];
if (this.checkedThing) {
this.videoContentCat.map(item => {
this.videoContentCat.map((item) => {
this.ruleForm.exhibitionBoardCatIdList.push(item.id);
});
} else {
this.ruleForm.exhibitionBoardCatIdList = [];
}
},
selectAllThing2() {
selectAllThing2() {
// debugger
this.ruleForm.copyrightOwnerIdList = [];
if (this.checkedThing2) {
this.assetType2.map(item => {
this.assetType2.map((item) => {
this.ruleForm.copyrightOwnerIdList.push(item.id);
});
} else {
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() {
// 至少选一个备选清单 提示
......@@ -507,7 +596,7 @@ export default {
} else {
this.$message({
message: "已经是第一条,上移失败",
type: "warning"
type: "warning",
});
}
},
......@@ -515,15 +604,15 @@ export default {
if (index + 1 == this.tableData.length) {
this.$message({
message: "已经是最后一条,下移失败",
type: "warning"
type: "warning",
});
} else {
let downData = this.tableData[index + 1];
this.tableData.splice(index + 1, 1);
this.tableData.splice(index, 0, downData);
}
}
}
},
},
};
</script>
......
<template>
<div class="listPage H100">
<div class="search-container">
<el-form :inline="true" :model="form" class="search-form" onsubmit="return false;">
<el-form-item >
<el-form :inline="true" :model="form" onsubmit="return false;">
<el-form-item>
<el-input
size="mini"
placeholder="请输入学习内容名称"
v-model="form.name"
@keyup.enter.native="Search"
clearable
></el-input>
</el-form-item>
<el-form-item >
<el-form-item>
<el-date-picker
value-format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
v-model="value1"
type="daterange"
range-separator="至"
......@@ -23,8 +22,12 @@
</el-form-item>
<el-form-item>
<div class="btn-group">
<el-button size="mini" type="primary" class="btn_form_search" @click="Search">查询</el-button>
<el-button size="mini" class="btn_form_search" @click="Reset">重置</el-button>
<el-button type="primary" class="btn_form_search" @click="Search"
>查询</el-button
>
<el-button size="mini" class="btn_form_search" @click="Reset"
>重置</el-button
>
</div>
</el-form-item>
</el-form>
......@@ -40,33 +43,53 @@
<div class="party-table">
<el-table
border
style="width: 100%;height:100%" height="100%"
style="width: 100%; height: 100%"
height="100%"
ref="multipleTable"
:data="tableData"
@selection-change="handleSelectionChange"
>
<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
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=""></el-table-column>
<el-table-column show-overflow-tooltip label="所含展板数量" prop="exhibitionBoardCount"></el-table-column>
<el-table-column label="审核状态" prop="auditStatus">
<template slot-scope="scope">
<span v-if="scope.row.auditStatus === 'TBC'">待初审</span>
<span v-else-if="scope.row.auditStatus === 'REFUSED'">已驳回</span>
<span v-else-if="scope.row.auditStatus === 'TBCA'">待复审</span>
<span v-else-if="scope.row.auditStatus === 'APPROVED_FINAL'">通过</span>
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
label="所含展板数量"
prop="exhibitionBoardCount"
></el-table-column>
<el-table-column label="审核状态" prop="auditStatus">
<template slot-scope="scope">
<span v-if="scope.row.auditStatus === 'TBC'">待初审</span>
<span v-else-if="scope.row.auditStatus === 'REFUSED'"
>已驳回</span
>
<span v-else-if="scope.row.auditStatus === 'TBCA'">待复审</span>
<span v-else-if="scope.row.auditStatus === 'APPROVED_FINAL'"
>通过</span
>
</template>
</el-table-column>
<el-table-column label="使用状态" prop="published">
<template slot-scope="scope">
<span v-if="scope.row.published"></span>
<span v-else></span>
<span v-if="scope.row.published">禁用</span>
<span v-else>启用</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip label="备注" prop="remarks"></el-table-column>
<el-table-column label="操作" width="240" header-align="center" align="center">
<template slot-scope="scope" >
</el-table-column>
<el-table-column
label="操作"
width="240"
header-align="center"
align="center"
>
<template slot-scope="scope">
<div class="table-btn-group">
<el-tooltip content="修改" placement="top">
<el-button circle @click="openEdit(scope.row)">
......@@ -79,36 +102,29 @@
</el-button>
</el-tooltip>
<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>
</el-button>
</el-tooltip>
<el-tooltip content="禁用" placement="top">
<el-button circle @click="handlePublish(scope.row,'False')">
<el-tooltip content="禁用" placement="top">
<el-button circle @click="handlePublish(scope.row, 'False')">
<i class="icon-table icon-disable"></i>
</el-button>
</el-tooltip>
<!-- <el-tooltip content="删除" placement="top">
<el-button circle @click="handleDelete(scope.row)">
<i class="icon-table icon-del"></i>
</el-button>
</el-tooltip> -->
</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="partyt-pagination">
<div class="partyt-pagination">
<el-pagination
small
background
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-size="page.pageSize"
layout="prev, pager, next, jumper"
:total="page.total"
></el-pagination>
</div>
</div>
</div>
</div>
</template>
......@@ -132,48 +148,47 @@ export default {
FormVisible1: false,
formLabelWidth: "100px",
form: {
name: ""
name: "",
},
editform: {
menuName: "",
menuUrl: "",
parentId: "",
sort: "",
id: ""
id: "",
},
permisform: {
menuName: "",
menuUrl: "",
parentId: "",
sort: ""
sort: "",
},
typeList: [],
rules: {
sort: [
{ required: true, message: "请输入顺序值", trigger: "change" },
{ pattern: /^(\d{1,5})?$/, message: "排序值为低于5位数的纯数字" }
{ pattern: /^(\d{1,5})?$/, message: "排序值为低于5位数的纯数字" },
],
menuName: [
{ required: true, message: "请输入菜单名称", trigger: "change" },
{ max: 20, message: "不能超过20个字符", trigger: "change" },
{ validator: checkIsNull, trigger: "blur" }
{ validator: checkIsNull, trigger: "blur" },
],
menuUrl: [
{ required: true, message: "请输入菜单地址", trigger: "change" },
{ validator: checkIsNull, trigger: "blur" }
{ validator: checkIsNull, trigger: "blur" },
],
parentId: [
{ required: true, message: "请输入父级菜单", trigger: "change" }
]
{ required: true, message: "请输入父级菜单", trigger: "change" },
],
},
value: "",
name: ""
name: "",
};
},
computed: {},
mounted() {
this.onSearch();
// this.getPermis();
},
components: {},
methods: {
......@@ -182,10 +197,12 @@ export default {
let vm = this;
vm.$https({
method: "get",
url: "menu/getRoleMenu?roleId=" + sessionStorage.gelearningContent("roleId"),
authType: this.backToken
url:
"menu/getRoleMenu?roleId=" +
sessionStorage.gelearningContent("roleId"),
authType: this.backToken,
}).then(
res => {
(res) => {
let data = res.data;
vm.typeList = data.map((e, i) => {
return {
......@@ -193,42 +210,44 @@ export default {
name:
e.menuName.indexOf("-") == -1
? e.menuName
: e.menuName.split("-")[1]
: e.menuName.split("-")[1],
};
});
},
error => {
(error) => {
console.log(error);
}
);
},
// 上下架
handlePublish(row ,isPublish) {
handlePublish(row, isPublish) {
let _this = this;
_this
.$https({
method: "put",
url: "learningContent/enable/" + row.id,
authType: this.backToken
},
_this.$qs.stringify({isPublish:isPublish}))
.then(
res => {
// this.$message({ type: "success", message: "删除成功!" });
// alert("已提交审核!")
this.msgInfo = {
type: "wait",
des: `申请已提交,待审核…`,
};
_this.Search();
},
error => {
this.$message({
type: "fail",
message: "失败!" + error.response.data
});
}
);
.$https(
{
method: "put",
url: "learningContent/enable/" + row.id,
authType: this.backToken,
},
_this.$qs.stringify({ isPublish: isPublish })
)
.then(
(res) => {
// this.$message({ type: "success", message: "删除成功!" });
// alert("已提交审核!")
this.msgInfo = {
type: "wait",
des: `申请已提交,待审核…`,
};
_this.Search();
},
(error) => {
this.$message({
type: "fail",
message: "失败!" + error.response.data,
});
}
);
},
// 获得数据接口
getTableData(param) {
......@@ -237,18 +256,18 @@ export default {
{
url: "learningContent/getPageList",
method: "post",
authType: this.backToken
authType: this.backToken,
},
vm.$qs.stringify(param)
// param
)
.then(res => {
.then((res) => {
let data = res.data.data;
vm.page.pageSize = data.size;
vm.page.total = data.total;
vm.tableData = data.records;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
......@@ -264,10 +283,10 @@ export default {
_this.getTableData(param);
},
// 重置
Reset(){
// this.$refs["form"].resetFields();
this.form = {}
this.Search()
Reset() {
this.form = {};
this.value1 = "";
this.Search();
},
Search() {
let _this = this;
......@@ -276,8 +295,8 @@ export default {
_index: 1,
_size: _this.page.pageSize,
name: _this.form.name,
startDate:this.value1?this.value1[0]:"",
endDate:this.value1?this.value1[1]:"",
startDate: this.value1 ? this.value1[0] : "",
endDate: this.value1 ? this.value1[1] : "",
};
this.getTableData(searchObj);
},
......@@ -286,7 +305,7 @@ export default {
let _this = this;
let searchObj = {
_index: _this.page.currentPage,
_size: _this.page.pageSize
_size: _this.page.pageSize,
};
for (let key in _this.form) {
if (_this.form[key]) {
......@@ -302,13 +321,13 @@ export default {
// this.FormVisible1 = true;
},
// 学习内容详情
learnDetails(row){
learnDetails(row) {
this.$router.push({ path: "learnContentDetails", query: { id: row.id } });
},
// 添加权限
permisSave() {
let _this = this;
_this.$refs.permisform.validate(valid => {
_this.$refs.permisform.validate((valid) => {
if (valid) {
_this
.$https(
......@@ -316,11 +335,11 @@ export default {
_this.$qs.stringify(_this.permisform)
)
.then(
res => {
(res) => {
if (res.data.status == 200 || res.data.status == 201) {
_this.$message({
type: "success",
message: res.data.message
message: res.data.message,
});
//跳回用户列表
_this.onSearch();
......@@ -332,14 +351,14 @@ export default {
} else {
_this.$message({
type: "error",
message: res.data.message
message: res.data.message,
});
}
},
error => {
(error) => {
_this.$message({
type: "error",
message: error
message: error,
});
}
);
......@@ -363,7 +382,7 @@ export default {
openEdit(row) {
this.$router.push({
path: "learnContentUpdate",
query: { type: "Update" ,id :row.id}
query: { type: "Update", id: row.id },
});
// alert('编辑')
// $('.el-dialog__title').html('编辑');
......@@ -381,27 +400,34 @@ export default {
this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
})
.then(() => {
_this.$https({
method: 'delete',
url: 'learningContent/delete/'+ row.id,
authType: this.backToken
}).then((res) => {
this.$message({type: 'success', message: '删除成功!'});
_this.Search();
}, (error) => {
this.$message({type: 'fail', message: "删除失败!" + error.response.data});
}
)
_this
.$https({
method: "delete",
url: "learningContent/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 => {
_this.$refs.editform.validate((valid) => {
if (valid) {
let searchObj = {};
for (let key in _this.editform) {
......@@ -418,16 +444,16 @@ export default {
{
url: "menu/edit",
method: "put",
authType: this.backToken
authType: this.backToken,
},
_this.$qs.stringify(searchObj)
)
.then(
res => {
(res) => {
if (res.data.status == 200 || res.data.status == 201) {
_this.$message({
type: "success",
message: res.data.message
message: res.data.message,
});
_this.onSearch();
_this.FormVisible = false;
......@@ -435,14 +461,14 @@ export default {
} else {
_this.$message({
type: "error",
message: res.data.message
message: res.data.message,
});
}
},
error => {
(error) => {
_this.$message({
type: "error",
message: error
message: error,
});
}
);
......@@ -454,14 +480,14 @@ export default {
handleSelectionChange(selection) {
let _this = this;
_this.selection = selection;
}
}
},
},
};
</script>
<style lang="less">
// @import "../../../../style/common";
// @import "../../style/list";
@import '../../../../style/table.less';
@import '../../../../style/pagination.less';
@import "../../../../style/table.less";
@import "../../../../style/pagination.less";
</style>
<template>
<div class="listPage H100">
<div class="search-container">
<el-form :inline="true" :model="form" ref="form" class="search-form" onsubmit="return false;">
<el-form-item >
<el-form :inline="true" :model="form" ref="form" onsubmit="return false;">
<el-form-item>
<el-input
size="mini"
placeholder="请输入学习项目名称"
v-model="form.name"
@keyup.enter.native="Search"
clearable
></el-input>
</el-form-item>
<el-form-item >
<el-form-item>
<el-date-picker
value-format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
v-model="value1"
type="daterange"
range-separator="至"
......@@ -23,14 +22,18 @@
</el-form-item>
<el-form-item>
<div class="btn-group">
<el-button size="mini" type="primary" class="btn_form_search" @click="Search">查询</el-button>
<el-button size="mini" class="btn_form_search" @click="Reset">重置</el-button>
<el-button type="primary" class="btn_form_search" @click="Search"
>查询</el-button
>
<el-button class="btn_form_search" @click="Reset">重置</el-button>
</div>
</el-form-item>
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips">展示系统所有的学习项目,可按照时间及相关名称进行快速信息搜索。</span>
<span class="page-tips"
>展示系统所有的学习项目,可按照时间及相关名称进行快速信息搜索。</span
>
</div>
</div>
<div class="table-content">
......@@ -40,19 +43,26 @@
<div class="party-table">
<el-table
border
style="width: 100%;height:100%" height="100%"
style="width: 100%; height: 100%"
height="100%"
ref="multipleTable"
:data="tableData"
@selection-change="handleSelectionChange"
>
<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="createTime"></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="操作" header-align="center" align="center">
<template slot-scope="scope" width="220">
<div class="table-btn-group">
<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="createTime"></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="操作" header-align="center" align="center">
<template slot-scope="scope" width="220">
<div class="table-btn-group">
<el-tooltip content="修改" placement="top">
<el-button circle @click="openEdit(scope.row)">
<i class="icon-table icon-edit"></i>
......@@ -64,27 +74,12 @@
</el-button>
</el-tooltip>
</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>
</el-table-column>
</template>
</el-table-column>
</el-table>
</div>
<div class="partyt-pagination">
<div class="partyt-pagination">
<el-pagination
small
background
@current-change="handleCurrentChange"
:current-page="page.currentPage"
......@@ -92,11 +87,17 @@
layout="prev, pager, next, jumper"
:total="page.total"
></el-pagination>
</div>
</div>
</div>
<!--新增弹框-->
<el-dialog title="新建" custom-class="party-dialog" width="468px" :visible.sync="FormVisible1" :before-close="close1">
<div class="dialog-content">
<!--新增弹框-->
<el-dialog
title="新建"
custom-class="party-dialog"
width="468px"
:visible.sync="FormVisible1"
:before-close="close"
>
<div class="dialog-content">
<el-form
:model="classForm"
ref="classForm"
......@@ -115,67 +116,22 @@
</el-form>
</div>
<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="permisEdit">确定</el-button>
<el-button size="mini" @click="close1">取 消</el-button>
<el-button size="mini" v-show="type" type="primary" @click="handleSubmit('save')"
>确定</el-button
>
<el-button size="mini" v-show="!type" type="primary" @click="handleSubmit('edit')"
>确定</el-button
>
<el-button size="mini" @click="close">取 消</el-button>
</div>
</el-dialog>
<!--编辑-->
<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>
</div>
</div>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
var checkIsNull = (rule, value, callback) => {
if (value) {
if (value.trim() == "") {
callback(new Error("不允许只输入空格"));
} else {
callback();
}
}
};
return {
type:true,
type: true,
value1: "",
page: { currentPage: 1, pageSize: 10, total: 0 },
tableData: [],
......@@ -183,75 +139,36 @@ export default {
FormVisible1: false,
formLabelWidth: "100px",
form: {
name: ""
name: "",
},
editform: {
menuName: "",
menuUrl: "",
parentId: "",
sort: "",
id: ""
id: "",
},
classForm: {
id:"",
name:"",
remarks:""
id: "",
name: "",
remarks: "",
},
typeList: [],
rules: {
sort: [
{ required: true, message: "请输入顺序值", trigger: "change" },
{ pattern: /^(\d{1,5})?$/, message: "排序值为低于5位数的纯数字" }
name: [
{ required: true, message: "请输入学习项目名称", trigger: "blur" },
],
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: "",
name: ""
name: "",
};
},
computed: {},
mounted() {
this.onSearch();
// this.getPermis();
},
components: {},
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) {
let vm = this;
......@@ -259,18 +176,18 @@ export default {
{
url: "learningProject/getPageList",
method: "post",
authType: this.backToken
authType: this.backToken,
},
vm.$qs.stringify(param)
// param
)
.then(res => {
.then((res) => {
let data = res.data.data;
vm.page.pageSize = data.size;
vm.page.total = data.total;
vm.tableData = data.records;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
......@@ -292,23 +209,22 @@ export default {
_index: 1,
_size: _this.page.pageSize,
name: _this.form.name,
startDate:this.value1?this.value1[0]:"",
endDate:this.value1?this.value1[1]:"",
startDate: this.value1 ? this.value1[0] : "",
endDate: this.value1 ? this.value1[1] : "",
};
this.getTableData(searchObj);
},
// 重置
Reset(){
// this.$refs["form"].resetFields();
this.form = {}
this.Search()
Reset() {
this.form = {};
this.Search();
},
// // 获取当前查询参数
getSearchQuery() {
let _this = this;
let searchObj = {
_index: _this.page.currentPage,
_size: _this.page.pageSize
_size: _this.page.pageSize,
};
for (let key in _this.form) {
if (_this.form[key]) {
......@@ -320,69 +236,41 @@ export default {
// 添加
addPermis() {
// this.$router.push({ path: "videoContentAdd", query: { type: "add" } });
$('.el-dialog__title').html('新建');
$(".el-dialog__title").html("新建");
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 => {
_this.$message({
type: "error",
message: error
});
}
);
}
});
handleSubmit(type) {
let httpUrl, httpMethod,requestParams;
if (type === "save") {
httpUrl = "learningProject/save";
httpMethod = "post";
}
if (type === "edit") {
httpUrl = "learningProject/update";
httpMethod = "put";
}
requestParams = {...this.classForm}
this.handleSave(httpUrl,httpMethod,requestParams)
},
// 编辑视频分类确认保存
permisEdit() {
handleSave(url,method,requestParams){
let _this = this;
_this.$refs.classForm.validate(valid => {
_this.$refs.classForm.validate((valid) => {
if (valid) {
_this
.$https(
{ url: "learningProject/update", method: "put", authType: this.backToken },
_this.$qs.stringify(_this.classForm)
// _this.classForm
_this.$https(
{
url: url,
method: method,
authType: this.backToken,
},
_this.$qs.stringify(requestParams)
)
.then(
res => {
(res) => {
if (res.data.resultCode == 200 || res.data.resultCode == 201) {
_this.$message({
type: "success",
message: '修改成功!'
message: res.data.message,
});
//跳回用户列表
_this.onSearch();
......@@ -394,14 +282,14 @@ export default {
} else {
_this.$message({
type: "error",
message: res.data.msg
message: res.data.msg,
});
}
},
error => {
(error) => {
_this.$message({
type: "error",
message: error
message: error,
});
}
);
......@@ -415,50 +303,33 @@ export default {
this.classForm[key] = null;
}
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) {
this.type = false
$('.el-dialog__title').html('编辑');
let _this=this;
//成功之后清除数据
// for (let key in this.editform) {
// _this.editform[key]=null;
// }
// _this.editform= Object.assign({}, row);
this.type = false;
$(".el-dialog__title").html("编辑");
let _this = this;
_this.FormVisible1 = true;
this.getAssetTypeInfo(row.id)
this.getAssetTypeInfo(row.id);
},
// 获取视频分类详情
getAssetTypeInfo(id){
getAssetTypeInfo(id) {
let vm = this;
vm.$https(
{
url: "learningProject/get/" + id,
method: "get",
authType: this.backToken
},
authType: this.backToken,
}
// param
)
.then(res => {
.then((res) => {
let data = res.data.data;
// this.classForm = data
this.classForm.id =data.id
this.classForm.name =data.name
this.classForm.remarks = data.remarks
this.classForm.id = data.id;
this.classForm.name = data.name;
this.classForm.remarks = data.remarks;
})
.catch(function(err) {
.catch(function (err) {
console.log(err);
});
},
......@@ -472,139 +343,36 @@ export default {
this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
type: "warning",
})
.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
.$https({
url: "menu/batchDel?menuIds=" + str,
method: "DELETE",
authType: this.backToken
method: "delete",
url: "learningProject/delete/" + row.id,
authType: this.backToken,
})
.then(
res => {
if (res.data.status == 201 || res.data.status == 200) {
this.$message({
type: "success",
message: "删除成功!"
});
}
//重新查询数据
_this.onSearch();
(res) => {
this.$message({ type: "success", message: "删除成功!" });
_this.Search();
},
error => {}
(error) => {
this.$message({
type: "fail",
message: "删除失败!" + error.response.data,
});
}
);
});
} else {
this.$message({
type: "info",
message: "请至少选择一个选项!"
});
}
})
.catch(() => {});
}
}
};
</script>
<style lang="less">
// @import "../../../../style/common";
// @import "../../style/list";
@import "../../../../style/dialog.less";
@import '../../../../style/table.less';
@import '../../../../style/pagination.less';
@import "../../../../style/table.less";
@import "../../../../style/pagination.less";
</style>
......@@ -60,7 +60,7 @@ export default {
feildList:[
{prop:'userName',label:'运维账号'},
{prop:'area',label:'运维区域'},
{prop:'operationIp',label:'操作Ip'},
{prop:'operationType',label:'操作类型'},
{prop:'createTime',label:'操作时间'}
],
list: [],
......
<template>
<!-- 平台操作日志 -->
<!-- 平台操作日志 -->
<div class="platform-log-wrapper height100">
<div class="search-container">
<el-form :inline="true" :model="form">
<el-form-item>
<el-input
v-model="form.nameOrCode"
placeholder="请输入操作者"
suffix-icon="el-icon-search"
></el-input>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="form.date"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-select
v-model="form.operationType"
placeholder="请选择操作类型">
<el-option
v-for="(item,index) in operationTypeList"
:key="index"
:label="item"
:value="item">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<div class="btn-group">
<el-button type="primary" @click="handleSubmit">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</div>
</el-form-item>
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips">可查看所有账号在系统上的操作信息,可根据操作类型、操作时间段查询等方式对日志信息进行筛选</span>
</div>
</div>
<div class="table-content hasTabs">
<party-table
class="noAdd"
:currentPage="page._index"
:feildList="feildList"
:list="list">
</party-table>
<party-pagination
:page="page"
@changePage="handleChangeCurrent"
/>
<div class="search-container">
<el-form :inline="true" :model="form">
<el-form-item>
<el-input
v-model="form.nameOrCode"
placeholder="请输入操作者"
suffix-icon="el-icon-search"
></el-input>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="form.date"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-select v-model="form.operationType" placeholder="请选择操作类型">
<el-option
v-for="(item, index) in operationTypeList"
:key="index"
:label="item"
:value="item"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<div class="btn-group">
<el-button type="primary" @click="handleSubmit">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</div>
</el-form-item>
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips"
>可查看所有账号在系统上的操作信息,可根据操作类型、操作时间段查询等方式对日志信息进行筛选</span
>
</div>
</div>
<div class="table-content hasTabs">
<party-table
class="noAdd"
:currentPage="page._index"
:feildList="feildList"
:list="list"
>
</party-table>
<party-pagination :page="page" @changePage="handleChangeCurrent" />
</div>
</div>
</template>
<script>
import { partyPagination,partyTable } from '@/components/index'
import { getLogType } from '@/config/logOperationType.js'
import { partyPagination, partyTable } from "@/components/index";
import { getLogType } from "@/config/logOperationType.js";
export default {
data(){
return{
form:{
nameOrCode:'',
date:'',
operationType:'',
startDate:'',
endDate:''
},
logType:1, //1.平台操作日志 2.用户操作日志
operationTypeList:[],
feildList:[
{prop:'operationTime',label:'操作时间'},
{prop:'operator',label:'操作者'},
{prop:'operationType',label:'操作类型'},
{prop:'operationObject',label:'操作对象'},
{prop:'operationIp',label:'操作Ip'},
],
list: [],
page:{
_index:1,
_size:10,
total:0
}
}
data() {
return {
form: {
nameOrCode: "",
date: "",
operationType: "",
startDate: "",
endDate: "",
},
logType: 1, //1.平台操作日志 2.用户操作日志
operationTypeList: [],
feildList: [
{ prop: "operationTime", label: "操作时间" },
{ prop: "operator", label: "操作者" },
{ prop: "operationType", label: "操作类型" },
{ prop: "operationObject", label: "操作对象" },
{ prop: "operationIp", label: "操作Ip" },
],
list: [],
page: {
_index: 1,
_size: 10,
total: 0,
},
};
},
components: { partyTable, partyPagination },
mounted() {
// 获取日志操作类型
this.getOperationType();
// 获取机顶盒运维类表
this.getLog();
},
methods: {
getOperationType() {
getLogType().then((res) => {
this.operationTypeList = res;
});
},
components:{ partyTable, partyPagination},
mounted(){
// 获取日志操作类型
this.getOperationType()
// 获取机顶盒运维类表
this.getLog()
handleSubmit() {
this.getLog();
},
methods:{
getOperationType(){
getLogType().then(res=>{
this.operationTypeList = res
})
},
handleSubmit(){
this.getLog()
},
handleReset(){
for(let key in this.form){
this.form[key] = ""
}
this.getLog()
handleReset() {
for (let key in this.form) {
this.form[key] = "";
}
this.getLog();
},
getLog() {
let requestParams = {};
requestParams._index = this.page._index;
requestParams._size = this.page._size;
requestParams.type = this.logType;
if (this.form.nameOrCode) {
requestParams.nameOrCode = this.form.nameOrCode;
}
if (this.form.operationType) {
requestParams.operationType = this.form.operationType;
}
if (this.form.date) {
requestParams.startDate = this.form.date[0];
requestParams.endDate = this.form.date[1];
}
this.$https(
{
method: "get",
url: "sysLog/querySysLogList",
authType: this.backToken,
},
getLog(){
let requestParams = {}
requestParams._index = this.page._index
requestParams._size = this.page._size
requestParams.type = this.logType
if(this.form.nameOrCode){
requestParams.nameOrCode = this.form.nameOrCode
requestParams
)
.then((res) => {
if (res.status != 200) {
this.getResWithOutData();
} else {
if (res.data.resultCode == 200) {
this.list = res.data.data.records;
this.page._size = res.data.data.size;
this.page.total = res.data.data.total;
} else {
this.getResWithOutData();
}
if(this.form.operationType){
requestParams.operationType = this.form.operationType
}
if(this.form.date){
requestParams.startDate = this.form.date[0]
requestParams.endDate = this.form.date[1]
}
this.$https({
method:'get',
url: 'sysLog/querySysLogList',
authType: this.backToken,
},requestParams).then(res=>{
if(res.status != 200){
this.getResWithOutData()
}else{
if(res.data.resultCode == 200){
this.list = res.data.data.records
this.page._size = res.data.data.size
this.page.total = res.data.data.total
}else{
this.getResWithOutData()
}
}
}).catch(err=>{
console.log(err)
})
},
// 页面返回值为空
getResWithOutData(){
this.list = []
this.page = {
_index:1,
_size:10,
total:0
}
},
// 翻页
handleChangeCurrent(val){
this.page._index = val
this.getLog()
}
}
})
.catch((err) => {
console.log(err);
});
},
// 页面返回值为空
getResWithOutData() {
this.list = [];
this.page = {
_index: 1,
_size: 10,
total: 0,
};
},
// 翻页
handleChangeCurrent(val) {
this.page._index = val;
this.getLog();
},
watch:{
}
}
},
watch: {},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<template>
<!-- 机顶盒运维日志 -->
<div class="set-top-log-wrapper height100">
<div class="search-container">
<el-form :inline="true" :model="form">
<el-form-item>
<el-select v-model="form.user" placeholder="请选择">
<el-option
v-model="form.organId"
v-for="item in organList"
:key="item.id"
:label="item.orgName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="form.date"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<div class="btn-group">
<el-button type="primary" @click="handleSubmit">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</div>
</el-form-item>
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips">可查看所有账号在系统上的操作信息,可根据操作类型、操作时间段查询等方式对日志信息进行筛选</span>
</div>
</div>
<div class="table-content hasTabs">
<party-table
class="noAdd"
:currentPage="page._index"
:feildList="feildList"
:list="list">
</party-table>
<party-pagination
:page="page"
@changePage="handleChangeCurrent"
/>
<div class="search-container">
<el-form :inline="true" :model="form">
<el-form-item>
<el-select v-model="form.user" placeholder="请选择所属单位">
<el-option
v-model="form.organId"
v-for="item in organList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="form.date"
type="daterange"
range-separator="至"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<div class="btn-group">
<el-button type="primary" @click="handleSubmit">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</div>
</el-form-item>
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips"
>可查看所有账号在系统上的操作信息,可根据操作类型、操作时间段查询等方式对日志信息进行筛选</span
>
</div>
</div>
<div class="table-content hasTabs">
<party-table
class="noAdd"
:currentPage="page._index"
:feildList="feildList"
:list="list"
>
</party-table>
<party-pagination :page="page" @changePage="handleChangeCurrent" />
</div>
</div>
</template>
<script>
import { partyPagination,partyTable } from '@/components/index'
import { getOrgListWithOutPage } from "@/config/organ.js"
import { partyPagination, partyTable } from "@/components/index";
import { getOrgListWithOutPage } from "@/config/organ.js";
export default {
data(){
return{
form:{
organId:'',
date:'',
startDate:'',
endDate:''
},
organList:[],
feildList:[
{prop:'macAddr',label:'机顶盒Mac地址'},
{prop:'orgName',label:'所属单位'},
{prop:'learnName',label:'学习内容'},
{prop:'startTime',label:'开始时间'},
{prop:'endTime',label:'结束时间'}
],
list: [],
page:{
_index:1,
_size:10,
total:0
}
}
data() {
return {
form: {
organId: "",
date: "",
startDate: "",
endDate: "",
},
organList: [],
feildList: [
{ prop: "macAddr", label: "机顶盒Mac地址" },
{ prop: "orgName", label: "所属单位" },
{ prop: "learnName", label: "学习内容" },
{ prop: "startTime", label: "开始时间" },
{ prop: "endTime", label: "结束时间" },
],
list: [],
page: {
_index: 1,
_size: 10,
total: 0,
},
};
},
components: { partyTable, partyPagination },
mounted() {
// 获取所属范围列表
this.getOrgList();
// 获取机顶盒运维类表
this.getFirstPageList();
},
methods: {
getOrgList() {
getOrgListWithOutPage().then((res) => {
this.organList = res;
});
},
components:{ partyTable, partyPagination},
mounted(){
// 获取所属范围列表
this.getOrgList()
// 获取机顶盒运维类表
this.getLog()
getFirstPageList() {
this.page._index = 1;
this.getPageList();
},
methods:{
getOrgList(){
getOrgListWithOutPage().then(res=>{
this.organList = res
})
},
handleSubmit(){
this.getLog()
},
handleReset(){
for(let key in this.form){
this.form[key] = ""
}
this.getLog()
handleSubmit() {
this.getPageList();
},
handleReset() {
for (let key in this.form) {
this.form[key] = "";
}
this.getFirstPageList();
},
getPageList() {
let requestParams = {};
requestParams._index = this.page._index;
requestParams._size = this.page._size;
if (this.form.organId) {
requestParams.organId = this.form.organId;
}
if (this.form.date) {
requestParams.startDate = this.form.date[0];
requestParams.endDate = this.form.date[1];
}
this.$https(
{
method: "get",
url: "sysLog/runLogList",
authType: this.backToken,
},
getLog(){
let requestParams = {}
requestParams._index = this.page._index
requestParams._size = this.page._size
if(this.form.organId){
requestParams.organId = this.form.organId
}
if(this.form.date){
requestParams.startDate = this.form.date[0]
requestParams.endDate = this.form.date[1]
requestParams
)
.then((res) => {
if (res.status != 200) {
this.getResWithOutData();
} else {
if (res.data.resultCode == 200) {
this.list = res.data.data.records;
this.page._size = res.data.data.size;
this.page.total = res.data.data.total;
} else {
this.getResWithOutData();
}
this.$https({
method:'get',
url: 'sysLog/runLogList',
authType: this.backToken,
},requestParams).then(res=>{
if(res.status != 200){
this.getResWithOutData()
}else{
if(res.data.resultCode == 200){
this.list = res.data.data.records
this.page._size = res.data.data.size
this.page.total = res.data.data.total
}else{
this.getResWithOutData()
}
}
}).catch(err=>{
console.log(err)
})
},
// 页面返回值为空
getResWithOutData(){
this.list = []
this.page = {
_index:1,
_size:10,
total:0
}
},
// 翻页
handleChangeCurrent(val){
this.page._index = val
this.getLog()
}
}
})
.catch((err) => {
console.log(err);
});
},
watch:{
}
}
// 页面返回值为空
getResWithOutData() {
this.list = [];
this.page = {
_index: 1,
_size: 10,
total: 0,
};
},
// 翻页
handleChangeCurrent(val) {
this.page._index = val;
this.getPageList();
},
},
watch: {},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<template>
<!-- 用户操作日志 -->
<!-- 用户操作日志 -->
<div class="platform-log-wrapper height100">
<div class="search-container">
<el-form :inline="true" :model="form">
<el-form-item>
<el-input
v-model="form.nameOrCode"
placeholder="请输入操作者"
suffix-icon="el-icon-search"
></el-input>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="form.date"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-select
v-model="form.operationType"
placeholder="请选择操作类型">
<el-option
v-for="(item,index) in operationTypeList"
:key="index"
:label="item"
:value="item">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<div class="btn-group">
<el-button type="primary" @click="handleSubmit">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</div>
</el-form-item>
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips">可查看所有账号在系统上的操作信息,可根据操作类型、操作时间段查询等方式对日志信息进行筛选</span>
</div>
</div>
<div class="table-content hasTabs">
<party-table
class="noAdd"
:currentPage="page._index"
:feildList="feildList"
:list="list">
</party-table>
<party-pagination
:page="page"
@changePage="handleChangeCurrent"
/>
<div class="search-container">
<el-form :inline="true" :model="form">
<el-form-item>
<el-input
v-model="form.nameOrCode"
placeholder="请输入操作者"
suffix-icon="el-icon-search"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="form.date"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
clearable
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-select
clearable
v-model="form.operationType"
placeholder="请选择操作类型"
>
<el-option
v-for="(item, index) in operationTypeList"
:key="index"
:label="item"
:value="item"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<div class="btn-group">
<el-button type="primary" @click="handleSubmit">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</div>
</el-form-item>
</el-form>
<div class="page-tip">
<span class="page-tip-title">页面说明:</span>
<span class="page-tips"
>可查看所有账号在系统上的操作信息,可根据操作类型、操作时间段查询等方式对日志信息进行筛选</span
>
</div>
</div>
<div class="table-content hasTabs">
<party-table
class="noAdd"
:currentPage="page._index"
:feildList="feildList"
:list="list"
>
</party-table>
<party-pagination :page="page" @changePage="handleChangeCurrent" />
</div>
</div>
</template>
<script>
import { partyPagination,partyTable } from '@/components/index'
import { getLogType } from '@/config/logOperationType.js'
import { partyPagination, partyTable } from "@/components/index";
import { getLogType } from "@/config/logOperationType.js";
export default {
data(){
return{
form:{
nameOrCode:'',
date:'',
operationType:'',
startDate:'',
endDate:''
},
logType:2, //1.平台操作日志 2.用户操作日志
operationTypeList:[],
feildList:[
{prop:'operationTime',label:'操作时间'},
{prop:'operator',label:'操作者'},
{prop:'operationType',label:'操作类型'},
{prop:'operationObject',label:'操作对象'},
{prop:'operationIp',label:'操作Ip'},
],
list: [],
page:{
_index:1,
_size:10,
total:0
}
}
data() {
return {
form: {
nameOrCode: "",
date: "",
operationType: "",
startDate: "",
endDate: "",
},
logType: 2, //1.平台操作日志 2.用户操作日志
operationTypeList: [],
feildList: [
{ prop: "operationTime", label: "操作时间" },
{ prop: "operator", label: "操作者" },
{ prop: "operationType", label: "操作类型" },
{ prop: "operationObject", label: "操作对象" },
{ prop: "operationIp", label: "操作Ip" },
],
list: [],
page: {
_index: 1,
_size: 10,
total: 0,
},
};
},
components: { partyTable, partyPagination },
mounted() {
// 获取日志操作类型
this.getOperationType();
// 获取机顶盒运维类表
this.getFirstPageList();
},
methods: {
getFirstPageList() {
this.page._index = 1;
this.getPageList();
},
components:{ partyTable, partyPagination},
mounted(){
// 获取日志操作类型
this.getOperationType()
// 获取机顶盒运维类表
this.getLog()
getOperationType() {
getLogType().then((res) => {
this.operationTypeList = res;
});
},
methods:{
getOperationType(){
getLogType().then(res=>{
this.operationTypeList = res
})
},
handleSubmit(){
this.getLog()
},
handleReset(){
for(let key in this.form){
this.form[key] = ""
}
this.getLog()
handleSubmit() {
this.getPageList();
},
handleReset() {
for (let key in this.form) {
this.form[key] = "";
}
this.getFirstPageList();
},
getPageList() {
let requestParams = {};
requestParams._index = this.page._index;
requestParams._size = this.page._size;
requestParams.type = this.logType;
if (this.form.nameOrCode) {
requestParams.nameOrCode = this.form.nameOrCode;
}
if (this.form.operationType) {
requestParams.operationType = this.form.operationType;
}
if (this.form.date) {
requestParams.startDate = this.form.date[0];
requestParams.endDate = this.form.date[1];
}
this.$https(
{
method: "get",
url: "sysLog/querySysLogList",
authType: this.backToken,
},
getLog(){
let requestParams = {}
requestParams._index = this.page._index
requestParams._size = this.page._size
requestParams.type = this.logType
if(this.form.nameOrCode){
requestParams.nameOrCode = this.form.nameOrCode
requestParams
)
.then((res) => {
if (res.status != 200) {
this.getResWithOutData();
} else {
if (res.data.resultCode == 200) {
this.list = res.data.data.records;
this.page._size = res.data.data.size;
this.page.total = res.data.data.total;
} else {
this.getResWithOutData();
}
if(this.form.operationType){
requestParams.operationType = this.form.operationType
}
if(this.form.date){
requestParams.startDate = this.form.date[0]
requestParams.endDate = this.form.date[1]
}
this.$https({
method:'get',
url: 'sysLog/querySysLogList',
authType: this.backToken,
},requestParams).then(res=>{
if(res.status != 200){
this.getResWithOutData()
}else{
if(res.data.resultCode == 200){
this.list = res.data.data.records
this.page._size = res.data.data.size
this.page.total = res.data.data.total
}else{
this.getResWithOutData()
}
}
}).catch(err=>{
console.log(err)
})
},
// 页面返回值为空
getResWithOutData(){
this.list = []
this.page = {
_index:1,
_size:10,
total:0
}
},
// 翻页
handleChangeCurrent(val){
this.page._index = val
this.getLog()
}
}
})
.catch((err) => {
console.log(err);
});
},
// 页面返回值为空
getResWithOutData() {
this.list = [];
this.page = {
_index: 1,
_size: 10,
total: 0,
};
},
// 翻页
handleChangeCurrent(val) {
this.page._index = val;
this.getPageList();
},
watch:{
}
}
},
watch: {},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
......@@ -356,11 +356,11 @@ const router = new Router({
// --学习
{
path: '/learnProject',
name: '学习项目制作',
name: '学习项目管理',
component: () => import('@/page/content/learn/project/index'),
meta: {
showBreadcrumb: true,
title: '学习项目制作',
title: '学习项目管理',
}
},
{
......
......@@ -389,7 +389,6 @@
}
.info-wrapper {
height: 100%;
width: 640px;
margin: 0 auto;
background: #fff;
......@@ -412,6 +411,7 @@
height: calc(100% - 156px);
overflow-y: auto;
overflow-x: hidden;
padding: 20px 0;
}
.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