Browse Source

更新接口对接

zxp19960123 5 năm trước cách đây
mục cha
commit
549573d8b0

+ 1 - 1
components/introductionToTheExperiment/syjj_second.vue

@@ -1,7 +1,7 @@
 <template>
 	<!-- 实验简介二级 -->
 	<view class="myComRoot df jcc syjj-root">
-		<view class="syjj-body" v-for="(page,pageI) in data_SYJJ" v-show="checkedIndex_second==pageI">
+		<view class="syjj-body" v-for="(page,pageI) in data_SYJJ" :key="pageI" v-show="checkedIndex_second==pageI">
 			<!-- 标题 -->
 			<view class="titleBox df fdr jcc" v-show="data_SYJJ[checkedIndex_second].page.length>1">
 				<view v-for="(item,i) in data_SYJJ[checkedIndex_second].page" :key="i" @click="onTitleClick(i)" class="df fdc aic jcc title-item"

+ 45 - 50
components/manager/assets.vue

@@ -15,68 +15,27 @@
 					</tr>
 				</thead>
 				<tbody>
-					<tr>
+					<tr v-for="(item,index) in tabledata" :key="index">
 						<th>
-							<image class="m_logoimg" src="../../assets/topMenu/introductionToTheExperimentUnchecked.png" mode=""></image>
+							<img :src="item.Texture_Url" alt="" style="width: 80rpx;">
+							<!-- <image class="m_logoimg" src="../../assets/topMenu/introductionToTheExperimentUnchecked.png" mode=""></image> -->
 						</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
+						<th>{{item.Fbx_Url}}</th>
+						<th></th>
+						<th></th>
 						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
 					</tr>
 				</tbody>
 			</table>
 		</view>
 		<view class="m_right_footer">
-			<view class="m_paging">
+			<!-- <view class="m_paging">
 				<text class="m_paging_item m_paging_upper">上一页</text>
 				<text class="m_paging_item" v-for="i in 8" @click="paging(i)" :key="i" :class="i==index?'p_act':''">
 					{{i}}
 				</text>
 				<text class="m_paging_item m_paging_lower">下一页</text>
-			</view>
+			</view> -->
 		</view>
 	</view>
 </template>
@@ -86,12 +45,48 @@
 		name: "manager_assets",
 		data() {
 			return {
+				queryList: {
+					BeginNum: 0,
+					EndNum: 100,
+					UserID: undefined,
+					ItemType: ""
+				},
 				index: 1,
+				tabledata:[]
 			}
 		},
 		methods: {
 			paging(obj) {
 				this.index = obj;
+			},
+			getList() {
+				this.queryList.UserID = this.$UserId;
+				uni.request({
+					url: this.$Api + "/backstage/getalluser",
+					data: this.queryList,
+					method: "POST",
+					dataType: "json",
+					success: res => {
+						var {
+							data
+						} = res;
+						if (data.code == 100) {
+							if (data.AllNumOfList > 0) {
+								this.tabledata = res.Items
+								// var tempCount = parseInt(data.AllNumOfList / this.pageSize);
+								// if (tempCount * this.pageSize == data.AllNumOfList)
+								// 	this.pageCount = tempCount;
+								// else
+								// 	this.pageCount = tempCount + 1;
+							} else {
+								this.tabledata = [];
+							}
+						} else {
+							this.tabledata = [];
+							// this.pageCount = 0;
+						}
+					}
+				})
 			}
 		}
 	}
@@ -184,7 +179,7 @@
 		position: absolute;
 		top: 50%;
 		left: 50%;
-		transform: translate(-50%,-50%);
+		transform: translate(-50%, -50%);
 	}
 
 	.m_paging {

+ 65 - 87
components/manager/project.vue

@@ -9,7 +9,7 @@
 					<tr>
 
 						<th>
-							<icon type="" style="color:#EA252C;" class="font_family" :class="checke?'icon-fuxuankuang_weixuanzhong4':'icon-fuxuankuang-true'"></icon>
+							<icon type="" @click="checkAll" style="color:#EA252C;" class="font_family" :class="checke?'icon-fuxuankuang_weixuanzhong4':'icon-fuxuankuang-true'"></icon>
 						</th>
 						<th>项目名称</th>
 						<th>项目创建人</th>
@@ -21,100 +21,29 @@
 					</tr>
 				</thead>
 				<tbody>
-					<tr>
+					<tr v-for="(item,index) in tabledata" :key="index">
 						<th>
-							<icon type="" style="color:#EA252C;" class="font_family" :class="checke?'icon-fuxuankuang_weixuanzhong4':'icon-fuxuankuang-true'"></icon>
+							<icon type="" style="color:#EA252C;" class="font_family" :class="item.checke?'icon-fuxuankuang_weixuanzhong4':'icon-fuxuankuang-true'"></icon>
 						</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th>CMII09</th>
-						<th>CMII09</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_online">上线</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>
-							<icon type="" style="color:#EA252C;" class="font_family" :class="checke?'icon-fuxuankuang_weixuanzhong4':'icon-fuxuankuang-true'"></icon>
-						</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th>CMII09</th>
-						<th>CMII09</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_offline">下线</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>
-							<icon type="" style="color:#EA252C;" class="font_family" :class="checke?'icon-fuxuankuang_weixuanzhong4':'icon-fuxuankuang-true'"></icon>
-						</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th>CMII09</th>
-						<th>CMII09</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_online">上线</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>
-							<icon type="" style="color:#EA252C;" class="font_family" :class="checke?'icon-fuxuankuang_weixuanzhong4':'icon-fuxuankuang-true'"></icon>
-						</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th>CMII09</th>
-						<th>CMII09</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_offline">下线</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>
-							<icon type="" style="color:#EA252C;" class="font_family" :class="checke?'icon-fuxuankuang_weixuanzhong4':'icon-fuxuankuang-true'"></icon>
-						</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th>CMII09</th>
-						<th>CMII09</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_online">上线</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>
-							<icon type="" style="color:#EA252C;" class="font_family" :class="checke?'icon-fuxuankuang_weixuanzhong4':'icon-fuxuankuang-true'"></icon>
-						</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th>CMII09</th>
-						<th>CMII09</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_offline">下线</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th>
-							<icon type="" style="color:#EA252C;" class="font_family" :class="checke?'icon-fuxuankuang_weixuanzhong4':'icon-fuxuankuang-true'"></icon>
-						</th>
-						<th>CMII09</th>
-						<th>张小旭</th>
-						<th>2021-01-01</th>
-						<th>CMII09</th>
-						<th>CMII09</th>
+						<th>{{item.ProjectName}}</th>
+						<th>{{item.CreateUserName}}</th>
+						<th>{{item.CreateTime}}</th>
+						<th>{{ITEM.ProjectReviewImage}}</th>
+						<th></th>
 						<th style="position: relative;"><button type="default" size="mini" class="m_online">上线</button></th>
 						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
 					</tr>
+
 				</tbody>
 			</table>
 		</view>
 		<view class="m_right_footer">
 			<view class="m_paging">
-				<text class="m_paging_item m_paging_upper">上一页</text>
-				<text class="m_paging_item" :key="i" v-for="i in 8" @click="paging(i)" :class="i==index?'p_act':''">
+				<text class="m_paging_item m_paging_upper" v-show="pageIndex>1&&pageCount>0">上一页</text>
+				<text class="m_paging_item" :key="i" v-for="i in pageCount" @click="paging(i)" :class="i==pageIndex?'p_act':''">
 					{{i}}
 				</text>
-				<text class="m_paging_item m_paging_lower">下一页</text>
+				<text class="m_paging_item m_paging_lower" v-show="pageIndex!=pageCount&&pageCount>0">下一页</text>
 			</view>
 		</view>
 	</view>
@@ -125,13 +54,63 @@
 		name: "project",
 		data() {
 			return {
-				index: 1,
-				checke: false
+				checke: false,
+				queryList: {
+					UserID: "",
+					BeginNum: 0,
+					EndNum: 15,
+				},
+				pageIndex: 1,
+				pageSize: 16,
+				pageCount: 12,
+				tabledata: []
 			}
 		},
+		created() {
+			this.getList();
+		},
 		methods: {
 			paging(obj) {
-				this.index = obj;
+				this.pageIndex = obj;
+				this.queryList.BeginNum = (this.pageIndex - 1) * this.pageSize;
+				this.queryList.EndNum = this.pageIndex * this.pageSize - 1;
+				this.getlist();
+			},
+			checkAll() {
+				this.checke = !this.checke;
+				this.tabledata.forEach(p => p.checke = this.checke);
+			},
+			getList() {
+				this.queryList.UserID = this.$UserId;
+				uni.request({
+					url: this.$Api + "/backstage/getprojects",
+					data: this.queryList,
+					method: "POST",
+					dataType: "json",
+					success: res => {
+						var {
+							data
+						} = res;
+						if (data.code == 100) {
+							if (data.AllNumOfList > 0) {
+								this.tabledata = res.Projects
+								this.tabledata.forEach(p => p.checke == false);
+								var tempCount = parseInt(data.AllNumOfList / this.pageSize);
+								if (tempCount * this.pageSize == data.AllNumOfList)
+									this.pageCount = tempCount;
+								else
+									this.pageCount = tempCount + 1;
+
+								this.checke = false;
+							} else {
+								this.tabledata = [];
+							}
+						} else {
+							this.tabledata = [];
+							this.pageCount = 0;
+						}
+					}
+				})
 			}
 		}
 	}
@@ -169,7 +148,6 @@
 
 	tbody tr {
 		border-top: 2rpx solid #DDDDDD !important;
-
 	}
 
 	tbody tr th {

+ 72 - 92
components/manager/user.vue

@@ -8,6 +8,7 @@
 				<thead class="m-table-hander">
 					<tr>
 						<th>用户名</th>
+						<th>姓名</th>
 						<th>班级</th>
 						<th>学号</th>
 						<th>电话</th>
@@ -19,79 +20,14 @@
 					</tr>
 				</thead>
 				<tbody>
-					<tr>
-						<th style="color: #EA252C;">张小旭</th>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>26</th>
-						<th>15038728747</th>
-						<th>2021-01-01</th>
-						<th>90</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th style="color: #EA252C;">张小旭</th>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>26</th>
-						<th>15038728747</th>
-						<th>2021-01-01</th>
-						<th>90</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th style="color: #EA252C;">张小旭</th>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>26</th>
-						<th>15038728747</th>
-						<th>2021-01-01</th>
-						<th>90</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th style="color: #EA252C;">张小旭</th>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>26</th>
-						<th>15038728747</th>
-						<th>2021-01-01</th>
-						<th>90</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th style="color: #EA252C;">张小旭</th>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>26</th>
-						<th>15038728747</th>
-						<th>2021-01-01</th>
-						<th>90</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th style="color: #EA252C;">张小旭</th>
-						<th>26</th>
-						<th>CMII09</th>
-						<th>26</th>
-						<th>15038728747</th>
-						<th>2021-01-01</th>
-						<th>90</th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
-						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
-					</tr>
-					<tr>
-						<th style="color: #EA252C;">张小旭</th>
-						<th>26</th>
+					<tr v-for="(item,index) in tabledata" :key="index">
+						<th style="color: #EA252C;">{{item.UserID}}</th>
+						<th>{{item.Name}}</th>
+						<th>{{item.Class}}</th>
 						<th>CMII09</th>
-						<th>26</th>
-						<th>15038728747</th>
-						<th>2021-01-01</th>
+						<th>{{item.PhoneNum}}</th>
+						<th>{{item.IlabAccount}}</th>
+						<th>{{item.SiginTime}}</th>
 						<th>90</th>
 						<th style="position: relative;"><button type="default" size="mini" class="m_edit">修改</button></th>
 						<th style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
@@ -101,11 +37,11 @@
 		</view>
 		<view class="m_right_footer">
 			<view class="m_paging">
-				<text class="m_paging_item m_paging_upper">上一页</text>
-				<text class="m_paging_item" :key="i" v-for="i in 8" @click="paging(i)" :class="i==index?'p_act':''">
+				<text class="m_paging_item m_paging_upper" v-show="pageIndex>1&&pageCount>0">上一页</text>
+				<text class="m_paging_item" :key="i" v-for="i in pageCount" @click="paging(i)" :class="i==pageIndex?'p_act':''">
 					{{i}}
 				</text>
-				<text class="m_paging_item m_paging_lower">下一页</text>
+				<text class="m_paging_item m_paging_lower" v-show="pageIndex!=pageCount&&pageCount>0">下一页</text>
 			</view>
 		</view>
 	</view>
@@ -116,12 +52,55 @@
 		name: "manager_user",
 		data() {
 			return {
-				index: 1,
+				queryList: {
+					UserID: "",
+					BeginNum: 0,
+					EndNum: 15,
+				},
+				pageIndex: 1,
+				pageSize: 16,
+				pageCount: 12,
+				tabledata: []
 			}
 		},
+		created() {
+			this.getlist();
+		},
 		methods: {
 			paging(obj) {
-				this.index = obj;
+				this.pageIndex = obj;
+				this.queryList.BeginNum = (this.pageIndex - 1) * this.pageSize;
+				this.queryList.EndNum = this.pageIndex * this.pageSize - 1;
+				this.getlist();
+			},
+			getlist() {
+				this.queryList.UserID = this.$UserId;
+				uni.request({
+					url: this.$Api + "/backstage/getalluser",
+					data: this.queryList,
+					method: "POST",
+					dataType: "json",
+					success: res => {
+						var {
+							data
+						} = res;
+						if (data.code == 100) {
+							if (data.AllNumOfList > 0) {
+								this.tabledata = res.Users
+								var tempCount = parseInt(data.AllNumOfList / this.pageSize);
+								if (tempCount * this.pageSize == data.AllNumOfList)
+									this.pageCount = tempCount;
+								else
+									this.pageCount = tempCount + 1;
+							} else {
+								this.tabledata = [];
+							}
+						} else {
+							this.tabledata = [];
+							this.pageCount = 0;
+						}
+					}
+				})
 			}
 		}
 	}
@@ -134,12 +113,12 @@
 		padding: 0 150rpx;
 		background-color: #fff;
 		box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
-	
+
 		.m_right_hander {
 			text-align: right;
 			height: 250rpx;
 			position: relative;
-	
+
 			.m_btn_red {
 				position: absolute;
 				height: 80rpx;
@@ -152,25 +131,26 @@
 				color: #fff;
 			}
 		}
-	
+
 	}
+
 	tbody tr {
 		border-top: 2rpx solid #DDDDDD !important;
-	
+
 	}
-	
+
 	tbody tr th {
 		font-weight: 400 !important;
 		height: 140rpx;
 		line-height: 140rpx;
 	}
-	
+
 	tbody tr:hover {
 		// color: #fff;
 		background: #FDEBEC;
 		// opacity: 0.08;
 	}
-	
+
 	.m-table-hander {
 		background-color: #FFF8F7;
 		height: 140rpx;
@@ -178,7 +158,7 @@
 		font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
 		font-weight: bold;
 	}
-	
+
 	.m_edit {
 		position: absolute;
 		top: 50%;
@@ -188,7 +168,7 @@
 		color: rgb(255, 255, 255);
 		min-width: 130rpx;
 	}
-	
+
 	.m_delete {
 		position: absolute;
 		top: 50%;
@@ -198,34 +178,34 @@
 		background: rgb(234, 37, 44);
 		color: rgb(255, 255, 255);
 	}
-	
+
 	.m_right_footer {
 		margin-top: 80rpx;
 	}
-	
+
 	.m_paging {
 		text-align: right;
-	
+
 		.m_paging_item {
 			padding: 10rpx 18rpx;
 			border: 1rpx solid #DDDDDD;
 			border-radius: 8rpx;
 			margin-right: 10rpx;
 		}
-	
+
 		.p_act {
 			background: #EA252C;
 			color: #fff;
 			border: inherit;
 		}
 	}
-	
+
 	.m_paging_item:hover {
 		background: #EA252C;
 		color: #fff;
 		border: inherit;
 	}
-	
+
 	.m_act1 {
 		color: #FF0019;
 	}

+ 3 - 0
main.js

@@ -14,6 +14,9 @@ const app = new Vue({
 })
 app.$mount()
 
+Vue.prototype.$Api="http://39.105.166.141:8085"
+Vue.prototype.$UserId="mp.xyueds.com"
+
 import './public.css';
 import './uni.scss';