소스 검색

翻页 以及userid空的bug

yichael 4 년 전
부모
커밋
5a264c45b9
4개의 변경된 파일42개의 추가작업 그리고 16개의 파일을 삭제
  1. 2 2
      components/login/loginByPWD.vue
  2. 28 10
      components/user/stuManage.vue
  3. 10 2
      myData/myData_XQDL_XXZLXZ.js
  4. 2 2
      pages/home.vue

+ 2 - 2
components/login/loginByPWD.vue

@@ -92,8 +92,8 @@
 							if (data.Image != '') {
 								mydata_userInfo.avatarSrc = data.Image;
 							}
-							console.log("登陆成功data=", data);
-							
+							console.log("login登陆成功data=", data);
+					
 							mydata_userInfo.Name = data.Name;
 							mydata_userInfo.UserID = data.UserID;
 							mydata_userInfo.Position = data.Position;

+ 28 - 10
components/user/stuManage.vue

@@ -17,12 +17,17 @@
 						</tr>
 					</thead>
 					<tbody>
-						<tr v-for="(student,studentI) in curPageStudentList" :key="studentI">
-							<th style="color: #EA252C;">{{student.userName}}</th>
+						<tr v-for="(student,studentI) in dataUsers_all" :key="studentI">
+							<!-- <th style="color: #EA252C;">{{student.userName}}</th>
 							<th>{{student.name}}</th>
 							<th>{{student.class}}</th>
 							<th>{{student.progress}}</th>
-							<th>{{student.score}}</th>
+							<th>{{student.score}}</th> -->
+							<th style="color: #EA252C;">{{student.IlabAccount}}</th>
+							<th>{{student.Name}}</th>
+							<th>{{student.Class}}</th>
+							<th>{{student.progress}}</th>
+							<th>{{student.Scores.Score}}</th>
 							<th style="position: relative;">
 								<button type="default" size="mini" class="m_delete" @click="onClick_XSSYQK(studentI)">实验情况</button>
 							</th>
@@ -30,7 +35,7 @@
 					</tbody>
 				</table>
 			</view>
-			<view class="m_right_footer">
+			<!-- <view class="m_right_footer">
 				<view class="m_paging">
 					<text selectable="true"class="m_paging_item m_paging_upper" @click="onClick_last" v-show="currentPage>1">上一页</text>
 					<text selectable="true"class="m_paging_item" :key="i" v-for="i in currentPage" @click="paging(i)" :class="i==currentPage?'p_act':''">
@@ -38,6 +43,15 @@
 					</text>
 					<text selectable="true"class="m_paging_item m_paging_lower" @click="onClick_next" v-show="currentPage>1">下一页</text>
 				</view>
+			</view> -->
+			<view class="m_right_footer">
+				<view class="m_paging">
+					<text class="m_paging_item m_paging_upper" v-show="bShowLastPageBtn" @click="onClick_last()">上一页</text>
+					<text class="m_paging_item" v-for="i in pageTotalNum" @click="paging(i)" :key="i" :class="i==currentPage?'p_act':''">
+						{{i}}
+					</text>
+					<text class="m_paging_item m_paging_lower" v-show="bShowNextPageBtn" @click="paging(i)">下一页</text>
+				</view>
 			</view>
 		</view>
 		<view class="df" v-show="isShowAdd">
@@ -67,7 +81,7 @@
 				
 				pageTotalNum:1,
 				currentPage:1,
-				totalItem:2,
+				totalItem:7,
 				// dataUsers_all: [],
 				bShowLastPageBtn:false,
 				bShowNextPageBtn:false,
@@ -77,7 +91,7 @@
 				//总计页数
 				// currentPage: 0,
 				//所有学生
-				allStudent: null,
+				// allStudent: null,
 				//当前页学生
 				curPageStudentList: [{
 					"userName": '',
@@ -92,6 +106,7 @@
 				},
 
 				addStuRule: '请输入用户名,多个用户名之间请用“;”符号隔开',
+				dataUsers_all: [],
 			}
 		},
 		methods: {
@@ -104,11 +119,11 @@
 				let toIndex = fromIndex+this.totalItem;
 			
 				let data = {
-					"UserID": mydata_userInfo.userID,
+					"UserID": mydata_userInfo.UserID,
 					"BeginNum": fromIndex, //用户数组索引
 					"EndNum": toIndex, //用户数组索引结束
 				}
-				
+		
 				uni.request({
 					header: {
 						'Content-Type': 'application/json;charset=UTF-8'
@@ -121,8 +136,11 @@
 						//100成功
 						if (res.data.Code == 100) {
 							console.log("请求全部学生", res);
-							this.allStudent = res.data.Items;
-							this.pageTotalNum = Math.ceil(res.data.AllOfItem/this.totalItem);
+							// this.allStudent = res.data.Items;
+							
+							this.dataUsers_all = res.data.Students;
+							this.pageTotalNum = Math.ceil(res.data.AllNumOfList/this.totalItem);
+							console.log('this.pageTotalNum=',this.pageTotalNum)
 							this.currentPage = i;					
 							this.showNextOrLastPageBtn();
 						}

+ 10 - 2
myData/myData_XQDL_XXZLXZ.js

@@ -38,8 +38,12 @@ myData_XQDL_XXZLXZ={
 					"type":'text',
 					"textList":[
 						{
-							"textType":'link',
+							"textType":'nor',
 							"text":'虚拟制片实践手册.pdf'
+						},
+						{
+							"textType":'link',
+							"text":'https://www.unrealengine.com/zh-CN/'
 						}
 					]
 				},
@@ -47,8 +51,12 @@ myData_XQDL_XXZLXZ={
 					"type":'text',
 					"textList":[
 						{
-							"textType":'link',
+							"textType":'nor',
 							"text":'表演实时捕捉白皮书.pdf'
+						},
+						{
+							"textType":'link',
+							"text":'https://www.unrealengine.com/zh-CN/'
 						}
 					]
 				},

+ 2 - 2
pages/home.vue

@@ -197,12 +197,12 @@
 							if (data.Image != '') {
 								mydata_userInfo.avatarSrc = data.Image;
 							}
-							console.log("登陆成功data=", data);
+							console.log("home登陆成功data=", data);
 							mydata_userInfo.Name = data.Name;
 							mydata_userInfo.UserID = data.UserID;
 							mydata_userInfo.Position = data.Position;
 							mydata_userInfo.role = data.Type;
-
+							
 							if (mydata_userInfo.role == '老师') {
 								userController.updateStudentList(null, null);
 							}