Przeglądaj źródła

优化

wulanhaote
庞东旭 2 lat temu
rodzic
commit
2ed6b03491
2 zmienionych plików z 57 dodań i 18 usunięć
  1. +1
    -1
      src/views/sunVillage_info/index.vue
  2. +56
    -17
      src/views/sunVillage_info/list_register.vue

+ 1
- 1
src/views/sunVillage_info/index.vue Wyświetl plik

@@ -174,7 +174,7 @@
},
logout(){
logout().then(res => {
this.$router.push({path:"/sunVillage_info/login"})
this.$router.push({path:"/sunVillage_info/index_code",query:{bookId:Cookies.get('bookId'),deptId:Cookies.get('deptId')}})
})
},
selectChange(val){


+ 56
- 17
src/views/sunVillage_info/list_register.vue Wyświetl plik

@@ -5,18 +5,22 @@
<div class="return_btn" @click="onClickLeft"></div>
<div class="add_btn" @click="goAdd" v-show="showBtn"></div>
</div>
<!-- <div class="record_main">-->
<!-- <div class="record_det">-->
<!-- <div class="year_l" @click="tabShow"><i :class="{'icon':true , 'zk':!showTab , 'ss':showTab } "></i>{{queryParams.year == '' ? '全部': queryParams.year}}<span class="unit">{{queryParams.year == '' ? '': '年'}}</span></div>-->
<!-- <div class="total_r">共{{listLength}}条公告</div>-->
<!-- </div>-->
<!-- <div class="record_list" v-if="showTab">-->
<!-- <div :class="{'flex_block':true , 'current':queryParams.year == ''}" @click="tabClick('')">全部</div>-->
<!-- <div :class="{'flex_block':true , 'current':queryParams.year == '2022'}" @click="tabClick('2022')">2022</div>-->
<!-- <div :class="{'flex_block':true , 'current':queryParams.year == '2021'}" @click="tabClick('2021')">2021</div>-->
<!-- <div :class="{'flex_block':true , 'current':queryParams.year == '2020'}" @click="tabClick('2020')">2020</div>-->
<!-- </div>-->
<!-- </div>-->
<div class="record_main">
<div class="record_det">
<div class="year_l" @click="tabShow"><i :class="{'icon':true , 'zk':!showTab , 'ss':showTab } "></i>{{year == '' ? '全部': year}}<span class="unit">{{year == '' ? '': '年'}}</span>{{month}}<span class="unit">{{month == '' ? '': '月'}}</span></div>
<div class="total_r">共{{listLength}}条公告</div>
</div>
<div class="record_list" v-if="showTab">
<div :class="{'flex_block':true , 'current':year == ''}" @click="tabClick('')">全部</div>
<div :class="{'flex_block':true , 'current':year == '2022'}" @click="tabClick('2022')">2022</div>
<div :class="{'flex_block':true , 'current':year == '2021'}" @click="tabClick('2021')">2021</div>
<div :class="{'flex_block':true , 'current':year == '2020'}" @click="tabClick('2020')">2020</div>
</div>
<div class="record_list month_list" v-if="showTab&&year != ''">
<div v-for="(item,index) in 12" :key="index" :class="{'flex_block':true , 'current':month == item}" @click="tabClickMonth(item)">
{{item}}月</div>
</div>
</div>
<div class="list_main">
<van-list
v-model="loading"
@@ -85,12 +89,14 @@
pageSize:10,
orderByColumn:'createTime',
isAsc:'desc',
year:'',
yearMonth:'',
},
uploadFiles1:[],
projectId:'',
projectIndex:'',
showBtn:true,
year:'',
month:'',
};
},
created() {
@@ -102,14 +108,14 @@
},
methods: {
getList(){
console.log(this.finished)
var _this = this;
console.log(_this.queryParams)
listOddjob(_this.queryParams).then(response => {
_this.listLength = response.total;
response.rows.map(res=>{
_this.applicationList.push(res);
})
console.log(_this.applicationList.length)
if(_this.applicationList.length >= response.total){
_this.finished = true;
return;
@@ -120,7 +126,28 @@
});
},
tabClick(year){
this.queryParams.year = year ;
this.year = year ;
if (year == ''){
this.queryParams.yearMonth = ''
this.month = ''
}else{
this.queryParams.yearMonth = year + '- 01'
this.month = '1'
}
this.finished = false;
this.queryParams.pageNum = 1;
this.applicationList = [];
this.getList();
},
tabClickMonth(month){
this.month = month ;
if (month < 10){
this.queryParams.yearMonth = this.year + '-0' + month
}else{
this.queryParams.yearMonth = this.year + '-' + month
}
this.finished = false;
this.queryParams.pageNum = 1;
this.applicationList = [];
this.getList();
},
@@ -285,9 +312,21 @@
}
}
}
.month_list{
.flex_block{
font-size: 30px;
color: #878787;
width: 12.5%;
padding-right: 0px;
&.current{
color: #4199fe;
font-weight: bold;
}
}
}
}
.list_main{
padding:22px;
padding: 0 22px;
.item{
height: 140px;
border-radius: 30px;


Ładowanie…
Anuluj
Zapisz