|
|
@@ -8,11 +8,11 @@
|
|
|
<ul class="listUl">
|
|
|
<li v-for="item in tzggArr" :key="item.noticeId">
|
|
|
<div class="dateDiv">
|
|
|
- <div class="day">{{item.createDay}}</div>
|
|
|
- <div>{{item.createMonth}}</div>
|
|
|
+ <div class="day">{{ item.createDay }}</div>
|
|
|
+ <div>{{ item.createMonth }}</div>
|
|
|
</div>
|
|
|
<router-link class="conDiv" :to="`/home`">
|
|
|
- <div class="tit">{{item.noticeTitle}}</div>
|
|
|
+ <div class="tit">{{ item.noticeTitle }}</div>
|
|
|
<div class="detail">
|
|
|
<div v-html="item.noticeContent"></div>
|
|
|
<span class="xq"
|
|
|
@@ -29,15 +29,15 @@
|
|
|
<ul class="listUl">
|
|
|
<li v-for="item in hyzxArr" :key="item.noticeId">
|
|
|
<div class="dateDiv">
|
|
|
- <div class="day">{{item.createDay}}</div>
|
|
|
- <div>{{item.createMonth}}</div>
|
|
|
+ <div class="day">{{ item.createDay }}</div>
|
|
|
+ <div>{{ item.createMonth }}</div>
|
|
|
</div>
|
|
|
<router-link class="conDiv" :to="`/home`">
|
|
|
- <div class="tit">{{item.noticeTitle}}</div>
|
|
|
+ <div class="tit">{{ item.noticeTitle }}</div>
|
|
|
<div class="detail">
|
|
|
<div v-html="item.noticeContent"></div>
|
|
|
<span class="xq"
|
|
|
- >详情<i class="el-icon-d-arrow-right"></i
|
|
|
+ >详情<i class="el-icon-d-arrow-right"></i
|
|
|
></span>
|
|
|
</div>
|
|
|
</router-link>
|
|
|
@@ -50,15 +50,18 @@
|
|
|
<ul class="listUl">
|
|
|
<li v-for="item in jjbyArr" :key="item.noticeId">
|
|
|
<div class="dateDiv">
|
|
|
- <div class="day">{{item.createDay}}</div>
|
|
|
- <div>{{item.createMonth}}</div>
|
|
|
+ <div class="day">{{ item.createDay }}</div>
|
|
|
+ <div>{{ item.createMonth }}</div>
|
|
|
</div>
|
|
|
- <router-link class="conDiv" :to="`/news/newsDetail?noticeId=${item.noticeId}`">
|
|
|
- <div class="tit">{{item.noticeTitle}}</div>
|
|
|
+ <router-link
|
|
|
+ class="conDiv"
|
|
|
+ :to="`/news/newsDetail?noticeId=${item.noticeId}`"
|
|
|
+ >
|
|
|
+ <div class="tit">{{ item.noticeTitle }}</div>
|
|
|
<div class="detail">
|
|
|
<div v-html="item.noticeContent"></div>
|
|
|
<span class="xq"
|
|
|
- >详情<i class="el-icon-d-arrow-right"></i
|
|
|
+ >详情<i class="el-icon-d-arrow-right"></i
|
|
|
></span>
|
|
|
</div>
|
|
|
</router-link>
|
|
|
@@ -69,13 +72,13 @@
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
<el-pagination
|
|
|
- class="pageDiv"
|
|
|
- background
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :page-size="pageSize"
|
|
|
- :current-page="currentPage"
|
|
|
- layout="prev, pager, next,total, jumper"
|
|
|
- :total="total"
|
|
|
+ class="pageDiv"
|
|
|
+ background
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :page-size="pageSize"
|
|
|
+ :current-page="currentPage"
|
|
|
+ layout="prev, pager, next,total, jumper"
|
|
|
+ :total="total"
|
|
|
></el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -88,80 +91,79 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
activeName: "first",
|
|
|
- tzggArr:[],
|
|
|
- hyzxArr:[],
|
|
|
- jjbyArr:[],
|
|
|
- currentPage:1,
|
|
|
- pageSize:10,
|
|
|
- total:0,
|
|
|
+ tzggArr: [],
|
|
|
+ hyzxArr: [],
|
|
|
+ jjbyArr: [],
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ total: 0
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- tabChange() {
|
|
|
- var that = this;
|
|
|
- that.currentPage = 1;
|
|
|
- if (that.activeName == "first") {
|
|
|
- that.listAll(1);
|
|
|
- } else if (that.activeName == "second") {
|
|
|
- that.listAll(2);
|
|
|
- }else if(that.activeName == "third"){
|
|
|
- that.listAll(3);
|
|
|
- }
|
|
|
- },
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.currentPage = val;
|
|
|
- if (that.activeName == "first") {
|
|
|
- that.listAll(1);
|
|
|
- } else if (that.activeName == "second") {
|
|
|
- that.listAll(2);
|
|
|
- }else{
|
|
|
- that.listAll(3);
|
|
|
+ tabChange() {
|
|
|
+ var that = this;
|
|
|
+ that.currentPage = 1;
|
|
|
+ if (that.activeName == "first") {
|
|
|
+ that.listAll(1);
|
|
|
+ } else if (that.activeName == "second") {
|
|
|
+ that.listAll(2);
|
|
|
+ } else if (that.activeName == "third") {
|
|
|
+ that.listAll(3);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.currentPage = val;
|
|
|
+ if (that.activeName == "first") {
|
|
|
+ that.listAll(1);
|
|
|
+ } else if (that.activeName == "second") {
|
|
|
+ that.listAll(2);
|
|
|
+ } else {
|
|
|
+ that.listAll(3);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ listAll(noticeType) {
|
|
|
+ var that = this;
|
|
|
+ that
|
|
|
+ .$post("interface/notice/getNoticeListAll", {
|
|
|
+ pageNum: that.currentPage1,
|
|
|
+ pageSize: that.pageSize1,
|
|
|
+ noticeType: noticeType
|
|
|
+ })
|
|
|
+ .then(function(res) {
|
|
|
+ console.log(res);
|
|
|
+ if (!res[0]) {
|
|
|
+ res[1].rows.forEach(function(item, index) {
|
|
|
+ let date = [];
|
|
|
+ let dateTime = [];
|
|
|
+ if (item.createTime) {
|
|
|
+ dateTime = item.createTime.split(" ");
|
|
|
+ date = dateTime[0].split("-");
|
|
|
+ item.createDay = date[2];
|
|
|
+ item.createMonth = date[0] + "-" + date[1];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ that.total = res[1].total;
|
|
|
+ if (noticeType == 1) {
|
|
|
+ that.tzggArr = res[1].rows;
|
|
|
+ } else if (noticeType == 2) {
|
|
|
+ that.hyzxArr = res[1].rows;
|
|
|
+ } else {
|
|
|
+ that.jjbyArr = res[1].rows;
|
|
|
+ }
|
|
|
}
|
|
|
- },
|
|
|
- listAll(noticeType) {
|
|
|
- var that = this;
|
|
|
- that
|
|
|
- .$post("interface/notice/getNoticeListAll", {
|
|
|
- pageNum: that.currentPage1,
|
|
|
- pageSize: that.pageSize1,
|
|
|
- noticeType:noticeType
|
|
|
- })
|
|
|
- .then(function(res) {
|
|
|
- console.log(res);
|
|
|
- if (!res[0]) {
|
|
|
- res[1].rows.forEach(function(item,index){
|
|
|
- let date = [];
|
|
|
- let dateTime = [];
|
|
|
- if(item.createTime){
|
|
|
- dateTime = item.createTime.split(" ");
|
|
|
- date = dateTime[0].split("-");
|
|
|
- item.createDay = date[2];
|
|
|
- item.createMonth = date[0]+'-'+date[1];
|
|
|
- }
|
|
|
- })
|
|
|
- that.total = res[1].total;
|
|
|
- if(noticeType == 1){
|
|
|
- that.tzggArr = res[1].rows;
|
|
|
- }else if(noticeType == 2){
|
|
|
- that.hyzxArr = res[1].rows;
|
|
|
- }else{
|
|
|
- that.jjbyArr = res[1].rows;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
activated() {
|
|
|
- if (this.$route.query.active) {
|
|
|
- this.activeName = this.$route.query.active;
|
|
|
- this.tabChange();
|
|
|
- }
|
|
|
+ if (this.$route.query.active) {
|
|
|
+ this.activeName = this.$route.query.active;
|
|
|
+ this.tabChange();
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.listAll(1);
|
|
|
- this.listAll(2);
|
|
|
- this.listAll(3);
|
|
|
+ this.listAll(1);
|
|
|
+ this.listAll(2);
|
|
|
+ this.listAll(3);
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
@@ -229,7 +231,7 @@ export default {
|
|
|
.detail {
|
|
|
height: 5rem;
|
|
|
line-height: 1.6rem;
|
|
|
- div{
|
|
|
+ div {
|
|
|
height: 3.2rem;
|
|
|
line-height: 1.6rem;
|
|
|
font-size: 1.2rem;
|