306132416@qq.com hace 3 años
padre
commit
b4524e4f32

+ 22 - 7
pages/index/activity/activity.vue

@@ -21,11 +21,17 @@
  
     <view>
 		<view class="active-title-box">
-			<picker mode="date" fields="year"  @change="bindDateChange" class="picker-class" style="margin-left: 2%; width: 15%;">
-				<view class="uni-input display-between items-center">{{dateYear}}年<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
+			<picker :range="arrayYear" :value="dateYear"  @change="bindDateChange" class="picker-class" style="margin-left: 2%; width: 15%;">
+				<view class="uni-input display-between items-center">
+				<view>{{dateYear}}<text v-if="dateYear!=='全部'">年</text></view>
+				<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image>
+				</view>
 			</picker>
 			<picker :range="arrayMonth" :value="dateMonth"  @change="bindDateMonthChange" class="picker-class" style="margin-left: 2%; width: 10%;">
-				<view class="uni-input display-between items-center" style="color: #707070;">{{dateMonth}}月<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image></view>
+				<view class="uni-input display-between items-center" style="color: #707070;">
+				<view>{{dateMonth}}<text v-if="dateMonth!=='全部'">月</text></view>
+				<image src="/static/calendar_icon.svg" mode="aspectFit" style="top: 18rpx;"></image>
+				</view>
 			</picker>
 		   <picker @change="bindPickerChange" :value="branchValue" :range="branchArray" :range-key="'name'">
 					<view class="uni-input">{{branchValue}}</view>
@@ -76,9 +82,10 @@ export default {
   mixins: [MescrollMixin], // 使用mixin
   data() {
     return {
-      dateYear:'全',
-      dateMonth:'全',
-	  arrayMonth:["1", "2","3", "4","5", "6","7", "8","9", "10","11", "12"],
+      dateYear:'全部',
+	  arrayYear:[],
+      dateMonth:'全部',
+	  arrayMonth:['全部',"1","2","3","4","5","6","7","8","9","10","11","12"],
       userHeadImg: getApp().globalData.user_headUrl,
       userNickName:getApp().globalData.user_name,
 	  userPhone:getApp().globalData.user_phone.substr(0, 3) + '****' + getApp().globalData.user_phone.substr(7),
@@ -97,8 +104,16 @@ export default {
   onLoad(option) {
 	  this.getUserInfoBranch()
 	  this.getActiveInfoBranch()
+	  this.makeYearArr()
   },
   methods: {
+	  makeYearArr(){
+		  let nowYear = new Date().getFullYear(),yearList = ['全部'];
+		  for(let i = 0; i < 10 ; i ++){
+			  yearList.push(nowYear--)
+		  }
+		  this.arrayYear = yearList;
+	  },
 	  pageRefresh(object) {
 	        if (object) {
 	            this.getActiveList(this.branchId)
@@ -216,7 +231,7 @@ export default {
 	      });
 	  },
 	  bindDateChange(e){ 
-			this.dateYear = e.target.value;
+			this.dateYear = this.arrayYear[e.target.value];
 			this.getActiveList(this.branchId)
 	  },
 	  bindDateMonthChange(e){

+ 1 - 1
pages/index/activity/create2.vue

@@ -156,7 +156,7 @@
 		},
 		onLoad(option) {
 			let branchList = JSON.parse(option.list);
-			this.lastPageLength = option.length;
+			this.lastPageLength = option.length || 1;
 			this.branchValue = branchList[0].name;
 			this.branchId = Number(branchList[0].id);
 			this.getPowerRequest(this.branchId);

+ 5 - 5
pages/index/honor/honor.vue

@@ -65,7 +65,7 @@
 				    </picker> -->
 				    <button @click="goRecord()" style="margin-left: 20%;">+获奖记录</button>
 				 </view>
-				 <view class="honor-box" v-for="(item,index) in myHonorList" :key="index" >
+				 <view class="honor-box" v-for="(item,index) in myHonorList" :key="index" style="position: relative;">
 					    <view class="honor-name">{{item.name}}</view>
 						<image :src="item.pic_url" mode="aspectFit" @click="showLarge(item.pic_url_resize)"></image>
 						<view style="display: flex;">
@@ -81,10 +81,10 @@
 							<text>|</text>
 							<text>{{item.for_str}}</text>
 						</view>
-						<!--<view class="edit-icon-box">
-							  <image src="/static/edit-icon.png" mode="aspectFit"></image>
-							  <image src="/static/del-icon.png" mode="aspectFit"></image>
-						</view> -->
+						<view class="edit-icon-box">
+							  <image src="/static/edit-icon.png" mode="aspectFit" v-show="item.edit_auth" @click="goRecord(item.id)"></image>
+							  <image src="/static/del-icon.png" mode="aspectFit" v-show="item.del_auth" @click="delRecord(item.id)"></image>
+						</view>
 				 </view>
 <!-- 				<view v-if="!honorList.length" class="no-data-box">
 				   	<image src="/static/nodata.svg" mode="aspectFit" style="width: 300rpx;height: 300rpx;"></image>