|
@@ -10,7 +10,7 @@
|
|
<div class="selectTwo">
|
|
<div class="selectTwo">
|
|
<div class="selectsBlock">
|
|
<div class="selectsBlock">
|
|
<el-input v-model="selectInput" style="width:200px" placeholder="请输入"></el-input>
|
|
<el-input v-model="selectInput" style="width:200px" placeholder="请输入"></el-input>
|
|
- <el-button type="primary" class="btn2" >查询</el-button>
|
|
|
|
|
|
+ <el-button type="primary" class="btn2" @click="getCourseManagement">查询</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<el-button type="primary" class="btn" @click="addMessage" size="mini">新建全站通知</el-button>
|
|
<el-button type="primary" class="btn" @click="addMessage" size="mini">新建全站通知</el-button>
|
|
@@ -23,6 +23,7 @@
|
|
:data="tableData"
|
|
:data="tableData"
|
|
tooltip-effect="dark"
|
|
tooltip-effect="dark"
|
|
stripe
|
|
stripe
|
|
|
|
+ style="height: 550px;"
|
|
class="fontSize"
|
|
class="fontSize"
|
|
:header-cell-style="{ background: '#f2f2f2',color:'#000' }"
|
|
:header-cell-style="{ background: '#f2f2f2',color:'#000' }"
|
|
>
|
|
>
|
|
@@ -66,7 +67,17 @@
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
<!-- 通知表格结束-->
|
|
<!-- 通知表格结束-->
|
|
-
|
|
|
|
|
|
+ <!-- 分页 -->
|
|
|
|
+ <el-pagination
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
|
+ :current-page="table.currentPage"
|
|
|
|
+ :page-size="table.packageSize"
|
|
|
|
+ layout=" prev, pager, next"
|
|
|
|
+ background
|
|
|
|
+ class="pagination"
|
|
|
|
+ :total="table.total">
|
|
|
|
+ </el-pagination>
|
|
|
|
+ <!-- 分页结束 -->
|
|
|
|
|
|
<!-- 添加全站通知开始 -->
|
|
<!-- 添加全站通知开始 -->
|
|
<el-dialog
|
|
<el-dialog
|
|
@@ -171,7 +182,13 @@
|
|
|
|
|
|
}
|
|
}
|
|
],
|
|
],
|
|
-
|
|
|
|
|
|
+ // 分页数据
|
|
|
|
+ table:{
|
|
|
|
+ total:10,
|
|
|
|
+ packageSize:10,
|
|
|
|
+ currentPage:1
|
|
|
|
+ },
|
|
|
|
+ // 添加数据
|
|
addMess:{
|
|
addMess:{
|
|
tit:'',
|
|
tit:'',
|
|
con:''
|
|
con:''
|
|
@@ -202,7 +219,7 @@
|
|
addMessage(){
|
|
addMessage(){
|
|
this.dialogVisible=true;
|
|
this.dialogVisible=true;
|
|
},
|
|
},
|
|
- confirmAdd(){
|
|
|
|
|
|
+ confirmAdd(){ //新建全站通知发送数据
|
|
let param ={
|
|
let param ={
|
|
uid:this.$store.state.userInfo.userid,
|
|
uid:this.$store.state.userInfo.userid,
|
|
title:this.addMess.tit,
|
|
title:this.addMess.tit,
|
|
@@ -221,14 +238,56 @@
|
|
},
|
|
},
|
|
lookIntro(){
|
|
lookIntro(){
|
|
this.dialogVisible2=true;
|
|
this.dialogVisible2=true;
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ getCourseManagement(){ //分页获取数据请求
|
|
|
|
+ if(this.value==1){
|
|
|
|
+ this.value=''
|
|
|
|
+ }
|
|
|
|
+ let currentPage=this.table.currentPage;
|
|
|
|
+ let packageSize=this.table.packageSize;
|
|
|
|
+ const param={
|
|
|
|
+ uid:this.$store.state.userInfo.userid,
|
|
|
|
+ title:this.selectInput,
|
|
|
|
+ noePage:currentPage,
|
|
|
|
+ lim:10
|
|
|
|
+ }
|
|
|
|
+ this.ajax
|
|
|
|
+ .get(this.$store.state.api+'/SelectNotification',param)
|
|
|
|
+ .then(res=>{
|
|
|
|
+ // 不是在第一页进行分页请求,请求数据为空,再发送一次请求获取数据,判断是否为第一页,防止无限循环
|
|
|
|
+ console.log(res)
|
|
|
|
+ // if(this.table.currentPage!==1 && res.data[1].length==0){
|
|
|
|
+ // this.table.currentPage=1
|
|
|
|
+ // this.getCourseManagement();
|
|
|
|
+ // }
|
|
|
|
+ // console.log(res.data);
|
|
|
|
+ // this.items=res.data[1]
|
|
|
|
+ // this.table.total=res.data[0][0].total
|
|
|
|
+ },err=>{
|
|
|
|
+ console.log(err);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 分页
|
|
|
|
+ handleCurrentChange(val) { //当页数发生改变的时候调用获取列表数据请求
|
|
|
|
+ // console.log(`当前页: ${val}`);
|
|
|
|
+ this.table.currentPage=val
|
|
|
|
+ this.getCourseManagement()
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ mounted(){
|
|
|
|
+ this.getCourseManagement()
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
.messageNotification{
|
|
.messageNotification{
|
|
|
|
|
|
|
|
+ .pagination{
|
|
|
|
+ float: right;
|
|
|
|
+ margin: 20px 35px 10px;
|
|
|
|
+ }
|
|
.el-dialog{
|
|
.el-dialog{
|
|
border-radius:5px;
|
|
border-radius:5px;
|
|
overflow: hidden;
|
|
overflow: hidden;
|