eraser 4 lat temu
rodzic
commit
f1906e550c

+ 1 - 24
components/leftMenu.vue

@@ -37,30 +37,7 @@
 				checkedIndex2: 0,
 
 				// ------以下为静态
-				btnList: [{
-						"text": '首页',
-						"icon_btn1_checked": require('../assets/leftMenu/icon_sy_02.png'),
-						"icon_btn1_unchecked": require('../assets/leftMenu/icon_sy_01.png'),
-						"list": ["虚拟仿真1号摄影棚",'虚拟仿真库','影视项目开发管理中心','虚拟仿真主题拍摄基地']
-					},
-					{
-						"text": '实验简介',
-						"icon_btn1_checked": require('../assets/leftMenu/icon_syjj_02.png'),
-						"icon_btn1_unchecked": require('../assets/leftMenu/icon_syjj_01.png'),
-						"list": ['评审账号', '快速进入实验', '实验概述', '实验使用环境与技术架构', '实验简介视频']
-					},
-					{
-						"text": '学习流程',
-						"icon_btn1_checked": require('../assets/leftMenu/icon_xxlc_02.png'),
-						"icon_btn1_unchecked": require('../assets/leftMenu/icon_xxlc_01.png'),
-						"list": ['原理认知', '实景勘察', '虚拟技术搭建', '虚拟艺术创作', '虚拟资源库建设']
-					},
-					{
-						"text": '开始学习',
-						"icon_btn1_checked": require('../assets/leftMenu/icon_ksxx_02.png'),
-						"icon_btn1_unchecked": require('../assets/leftMenu/icon_ksxx_01.png'),
-						"list": ['前序准备', '学习与实验', '测试与结果']
-					},
+				btnList: [
 					{
 						"text": '后台',
 						"icon_btn1_checked": require('../assets/leftMenu/icon_ksxx_02.png'),

+ 3 - 3
components/login/login.vue

@@ -29,8 +29,8 @@
 		},
 		data() {
 			return {
-				visibleChooseRole: true,
-				visibleLoginByPWD: false,
+				visibleChooseRole: false,
+				visibleLoginByPWD: true,
 				visibleResetPWD: false,
 				//当前登录类型T教师S学生
 				roleType: '',
@@ -38,7 +38,7 @@
 		},
 		methods: {
 			onLogin: function() {
-				console.log("登录成功login");
+				// console.log("登录成功login");
 				this.$emit("onLogin");
 				this.visibleChooseRole = false;
 				this.visibleLoginByPWD = false;

+ 15 - 50
components/login/loginByPWD.vue

@@ -21,24 +21,24 @@
 			<!-- 横线 -->
 			<view class="loginByPWD-line"></view>
 			<!-- 支持使用实验空间账号登录 -->
-			<view class="df aic loginByPWD-tip1box">
+			<!-- <view class="df aic loginByPWD-tip1box">
 				<view class="loginByPWD-tip1box-checkbox df aic">
 					<img src="../../assets/login/loginIcon5.png" />
 				</view>
 				<view class="loginByPWD-tip1box-tip">支持使用实验空间账号登录</view>
-			</view>
+			</view> -->
 			<!-- 评审账号和密码 -->
-			<view class="df loginByPWD-tip2box">
+			<!-- <view class="df loginByPWD-tip2box">
 				<view class="loginByPWD-tip2box-account">评审账号:teststudent01</view>
 				<view class="loginByPWD-tip2box-pwd">密码:qgsTest002</view>
-			</view>
+			</view> -->
 			<!-- 登录按钮 -->
 			<view class="loginByPWD-loginbtn df jcc aic btn-hover" @click="onLogin">登录</view>
 			<!-- 注册账号忘记密码 -->
-			<view class="df fdr loginByPWD-registerOrForgetBox">
+			<!-- <view class="df fdr loginByPWD-registerOrForgetBox">
 				<a :href="regURL" class="loginByPWD-register">注册实验空间账号</a>
 				<view class="loginByPWD-forget" @click="onForget">忘记密码</view>
-			</view>
+			</view> -->
 			<view :style="{'opacity': isShowTip}" class="loginByPWD-failTip df jcc">登录失败!请查看账号及密码是否正确!</view>
 		</view>
 	</view>
@@ -66,21 +66,16 @@
 				this.isShowTip = 0;
 			},
 			onLogin() {
-				console.log("账号密码", this.account, this.password);
-				let url = "http://39.105.166.141:8085/user/loginin";
-				// let url = "http://39.105.166.141:8085/user/getallstudent";
+				// console.log("账号密码", this.account, this.password);
+				
 				uni.request({
 					header: {
 						// 'Content-Type': 'application/x-www-form-urlencoded'
 						'Content-Type': 'application/json;charset=UTF-8'
 					},
-					url: url,
+					url: mydata_api+"/user/loginin",
 					method: 'POST',
 					data: {
-						// "IlabAccount": "teststudent01",
-						// "Password": "qgsTest002"
-						// "IlabAccount": "13790516503",
-						// "Password": "qwerty123..."
 						"IlabAccount": this.account,
 						"Password": this.password
 					},
@@ -89,55 +84,25 @@
 						let data = res.data;
 						//登录成功
 						if (data.Code == 100) {
-							console.log("登陆成功");
-							this.$emit("onLogin")
+							console.log("登陆成功",this.account,data);
+							mydata_userInfo.account = this.account;
+							mydata_userInfo.userID=data.UserID;
+							// console.log("登陆以后的用户信息",mydata_userInfo);
+							this.$emit("onLogin");
 						}
 						//密码错误
 						else {
-							this.isShowTip=1;
+							this.isShowTip = 1;
 						}
-						console.log("success+++**+*", res.data.Code)
 					},
 					fail: (res) => {
 						console.log("fail+**+*", res)
 					}
 				});
 			},
-			// onLogin: function(type) {
-			// 	this.$emit("onLogin", "onLogin")
-			// },
 			onForget() {
 				this.$emit("onForget", "onForget")
 			}
-			// test() {
-			// 	this.$emit("pChangeType","哈哈哈")
-			// 	let url = "http://121.4.59.141:1986/hello";
-			// 	uni.request({
-			// 		header: {
-			// 			// 'Content-Type': 'application/x-www-form-urlencoded'
-			// 			// 'Content-Type': 'application/json',
-			// 			'Content-Type': 'application/json'
-			// 		},
-			// 		url: url,
-			// 		method: 'POST',
-			// 		data: {
-			// 			// "IlabAccount": "teststudent01",
-			// 			// "Password": "qgsTest002"
-			// 			"name": "13790516503",
-			// 			"message": "qwerty123..."
-			// 			// "IlabAccount": this.account,
-			// 			// "Password": this.password
-			// 		},
-			// 		dataType: 'json',
-			// 		success: (res) => {
-			// 			// var result = JSON.parse(res);
-			// 			console.log("success+**+*", res)
-			// 		},
-			// 		fail: (res) => {
-			// 			console.log("fail+**+*", res)
-			// 		}
-			// 	});
-			// }
 		}
 	}
 </script>

+ 20 - 124
components/manager/Index.vue

@@ -1,18 +1,9 @@
 <template>
 	<view class="m_container">
 		<view class="m_left">
-			<view class="m_hander">
-				<view class="m_teacher">
-					<image src="../../assets/login/loginPic2.png" class="m_head_portrait"></image>
-					<view class="m_teacher_name" v-text="name"></view>
-					<view class="m_teacher_position" v-text="position"></view>
-				</view>
-			</view>
 			<view class="m_menu">
 				<view class="m_menu-item " :class="item.select?'m_act_font':''" v-for="(item,index) in menu" :key="index" @click="checkMenu(item)">
-					<view :class="item.select?'m_act':''">
-
-					</view>
+					<view :class="item.select?'m_act':''"></view>
 					<view class="m_menu_item_icon">
 						<icon type="" class="font_family" :class="item.select?(item.icon+' m_act1'):item.icon"></icon>
 					</view>
@@ -20,119 +11,6 @@
 				</view>
 			</view>
 		</view>
-		<!-- 	<view class="m_right">
-
-				<view class="m_right_hander">
-				<button size="mini" class="m_btn_red">添加用户</button>
-			</view>
-			<view class="m_right_container">
-				<table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
-					<thead class="m-table-hander">
-						<tr>
-							<th>用户名</th>
-							<th>班级</th>
-							<th>学号</th>
-							<th>电话</th>
-							<th>ilab账户</th>
-							<th>注册时间</th>
-							<th>分数</th>
-							<th>修改信息</th>
-							<th>删除</th>
-						</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>
-							<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>
-					</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" v-for="i in 8" @click="paging(i)" :class="i==index?'p_act':''">
-						{{i}}
-					</text>
-					<text class="m_paging_item m_paging_lower">下一页</text>
-				</view>
-			</view>
- 
-			
-		</view>-->
 		<user ref="user" v-show="routerDataIndex==1"></user>
 		<assets ref="assets" v-show="routerDataIndex==2"></assets>
 		<project ref="project" v-show="routerDataIndex==3"></project>
@@ -183,12 +61,30 @@
 					if (p.id == obj.id) {
 						p.select = true;
 						this.routerDataIndex = obj.id;
+						
+						switch (this.routerDataIndex) {
+							case 1:
+								this.$refs.user.initPage();
+								break;
+							case 2:
+								this.$refs.assets.initPage();
+								break;
+							case 3:
+								this.$refs.project.initPage();
+								break;
+					
+							default:
+								console.log("切换中间导航状态", this.routerDataIndex);
+						}
 					} else {
 						p.select = false;
 					}
 				});
 			},
-
+			//登录后默认显示用户列表,开始更新数据了
+			onLogin(){
+				this.$refs.user.initPage();
+			}
 		}
 	}
 </script>

+ 213 - 68
components/manager/assets.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="m_right">
 		<view class="m_right_hander">
-			<button size="mini" class="m_btn_red">添加资产</button>
+			<button size="mini" class="m_btn_red" @click="addZc()">添加资产</button>
 		</view>
 		<view class="m_right_container">
 			<table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
@@ -15,84 +15,222 @@
 					</tr>
 				</thead>
 				<tbody>
-					<tr>
+					<tr v-for="(dataUser,dataUserI) in dataUsers_all" :key="dataUserI">
 						<th>
-							<image class="m_logoimg" src="../../assets/topMenu/introductionToTheExperimentUnchecked.png" mode=""></image>
+							<image class="m_logoimg" :src="dataUser.Texture_Url" 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 style="position: relative;"><button type="default" size="mini" class="m_delete">删除</button></th>
+						<th>{{dataUser.Name}}</th>
+						<th>{{dataUser.CreateUserName}}</th>
+						<th>{{dataUser.UploadTime}}</th>
+						<th style="position: relative;"><button type="default" size="mini" class="m_delete" @click="deleteZc(dataUser)">删除</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" v-for="i in 8" @click="paging(i)" :key="i" :class="i==index?'p_act':''">
+				<text class="m_paging_item m_paging_upper" v-show="bShowLastPageBtn">上一页</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">下一页</text>
+				<text class="m_paging_item m_paging_lower" v-show="bShowNextPageBtn">下一页</text>
 			</view>
 		</view>
+		<popForm ref="popForm"></popForm>
+		<popAlert ref="popAlert"></popAlert>
 	</view>
 </template>
 
 <script>
+	import popForm from '@/components/popForm.vue'
+	import popAlert from '@/components/popAlert.vue'
+	
 	export default {
 		name: "manager_assets",
+		components: {
+			popForm,
+			popAlert,
+		},
 		data() {
 			return {
-				index: 1,
+				pageTotalNum:1,
+				currentPage:1,
+				totalItem:2,
+				dataUsers_all: [],
+				bShowLastPageBtn:false,
+				bShowNextPageBtn:false,
 			}
 		},
 		methods: {
-			paging(obj) {
-				this.index = obj;
-			}
+			paging(i) {
+				uni.showLoading({
+				    title: '加载中'  
+				});
+				
+				let fromIndex = this.totalItem*(i-1);
+				let toIndex = fromIndex+this.totalItem;
+				
+				let data = {
+					"UserID": mydata_userInfo.userID,
+					"BeginNum": fromIndex, //用户数组索引
+					"EndNum": toIndex, //用户数组索引结束
+					"ItemType":""//道具 角色 场景  空为全部
+				}
+				
+				uni.request({
+					header: {
+						'Content-Type': 'application/json;charset=UTF-8'
+					},
+					url: mydata_api + '/item/getitemlist',
+					method: 'POST',
+					data: data,
+					dataType: 'json',
+					success: (res) => {
+						//100成功
+						if (res.data.Code == 100) {
+							console.log("请求全部资产", res);
+							this.dataUsers_all = res.data.Items;
+							this.pageTotalNum = Math.ceil(res.data.AllOfItem/this.totalItem);
+							console.log("this.pageTotalNum=", this.pageTotalNum);
+						}
+						//200失败
+						else {
+							console.log('suc200', res);
+						}
+						uni.hideLoading();
+						this.showNextOrLastPageBtn();
+					},
+					fail: (res) => {
+						console.log("请求失败****");	
+						uni.hideLoading();
+					}
+				});
+			},
+			initPage() {
+				this.paging(1);
+			},
+			showNextOrLastPageBtn()
+			{
+				if((this.pageTotalNum-this.totalItem)>0)
+				{
+					this.bShowLastPageBtn = false;
+					this.bShowNextPageBtn = false;
+					// console.log('0000')
+				}
+				else if(this.pageTotalNum==this.currentPage)
+				{
+					this.bShowLastPageBtn = true;
+					this.bShowNextPageBtn = false;
+					// console.log('11111')
+				}
+				else if(1==this.currentPage)
+				{
+					this.bShowLastPageBtn = false;
+					this.bShowNextPageBtn = true;
+					// console.log('2222')
+				}
+				else
+				{
+					this.bShowLastPageBtn = true;
+					this.bShowNextPageBtn = true;
+					// console.log('333333')
+				}
+			},
+			addZc(){
+				
+				uni.chooseFile({
+					success: (chooseFileRes) => 
+					{
+						console.log('选择文件成功')
+						const tempFilePaths = chooseFileRes.tempFilePaths;
+												
+						this.$refs.popForm.isShow(true);
+						this.$refs.popForm.setTitle('添加资产');
+						
+						let _self = this;
+						let callback = function(content_arr){
+							
+							let data = {
+								"UserID":mydata_userInfo.userID,
+								"ItemName":content_arr[0].input,
+							}
+							
+							uni.showLoading({
+							    title: '上传中'  
+							});
+							
+							uni.uploadFile({
+								url: mydata_api + '/item/uploadfile', 
+								filePath: tempFilePaths[0],
+								name: 'file',
+								formData:data,
+								success: (uploadFileRes) => {								
+									console.log("上传资产成功", uploadFileRes);
+									_self.paging(_self.currentPage);																	
+									uni.hideLoading();
+								},
+								fail: (res) => {
+									console.log("上传失败");
+									uni.hideLoading();
+								}
+							});
+						};
+						
+						this.$refs.popForm.setContent([
+							{
+								'name':'物品名称',
+								'input':'',
+								'type' :'text'
+							}
+						],callback);						
+					}
+				});	
+			},
+			deleteZc(dataUser)
+			{
+				this.$refs.popAlert.isShow(true);	
+				this.$refs.popAlert.setTitle('提示');
+				let _self = this;	
+				let callback = function(){
+					let data = {
+						"UserID":mydata_userInfo.userID,
+						"ItemID":[dataUser.Id]
+					}
+					
+					uni.showLoading({
+					    title: '删除中'  
+					});
+					
+					uni.request({
+						header: {
+							'Content-Type': 'application/json;charset=UTF-8'
+						},
+						url: mydata_api + '/backstage/deleteitem',
+						method: 'POST',
+						data: data,
+						dataType: 'json',
+						success: (res) => {
+							//100成功
+							if (res.data.Code == 100) {
+								console.log("删除资产成功", res);
+								_self.paging(_self.currentPage);
+							}
+							//200失败
+							else {
+								console.log('删除用户资产失败200', res);
+							}
+							
+							uni.hideLoading();
+						},
+						fail: (res) => {
+							console.log("删除用户资产失败");
+							uni.hideLoading();
+						}
+					});
+				}
+				
+				this.$refs.popAlert.setContent('是否删除资产',callback);
+			},
 		}
 	}
 </script>
@@ -126,8 +264,12 @@
 	}
 
 	tbody tr {
-		border-top: 2rpx solid #DDDDDD !important;
-
+		// border-top: 2rpx solid #DDDDDD !important;
+		border: 2rpx solid #DDDDDD !important;
+	}
+	
+	th {
+		border: 2rpx solid #DDDDDD !important;
 	}
 
 	tbody tr th:first-child {
@@ -140,11 +282,11 @@
 		line-height: 140rpx;
 	}
 
-	tbody tr:hover {
-		// color: #fff;
-		background: #FDEBEC;
-		// opacity: 0.08;
-	}
+	// tbody tr:hover {
+	// 	// color: #fff;
+	// 	background: #FDEBEC;
+	// 	// opacity: 0.08;
+	// }
 
 	.m-table-hander {
 		background-color: #FFF8F7;
@@ -165,11 +307,14 @@
 	}
 
 	.m_delete {
-		position: absolute;
-		top: 50%;
-		left: 50%;
-		min-width: 130rpx;
-		transform: translate(-50%, -50%);
+		// position: absolute;
+		// top: 50%;
+		// left: 50%;
+		// min-width: 130rpx;
+		// transform: translate(-50%, -50%);
+		// background: rgb(234, 37, 44);
+		// color: rgb(255, 255, 255);
+		
 		background: rgb(234, 37, 44);
 		color: rgb(255, 255, 255);
 	}

+ 285 - 116
components/manager/project.vue

@@ -1,137 +1,301 @@
 <template>
 	<view class="m_right">
 		<view class="m_right_hander">
-			<button size="mini" class="m_btn_red">添加项目</button>
+			<button size="mini" class="m_btn_red" @click="addProject()">添加项目</button>
 		</view>
 		<view class="m_right_container">
 			<table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
 				<thead class="m-table-hander">
 					<tr>
-
-						<th>
+						<!-- <th>
 							<icon type="" style="color:#EA252C;" class="font_family" :class="checke?'icon-fuxuankuang_weixuanzhong4':'icon-fuxuankuang-true'"></icon>
-						</th>
+						</th> -->
 						<th>项目名称</th>
 						<th>项目创建人</th>
 						<th>项目创建时间</th>
 						<th>项目描述</th>
-						<th>项目推荐</th>
+						<!-- <th>项目推荐</th> -->
 						<th>上线</th>
 						<th>删除</th>
 					</tr>
 				</thead>
 				<tbody>
-					<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 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>
+					<tr v-for="(dataUser,dataUserI) in dataUsers_all" :key="dataUserI">
+						<!-- <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>
+						</th> -->
+						<th>{{dataUser.ProjectName}}</th>
+						<th>{{dataUser.CreateUserName}}</th>
+						<th>{{dataUser.CreateTime}}</th>
+						<th>{{dataUser.Type}}</th>
+						<!-- <th>{{dataUser.ProjectName}}</th> -->
+						<th style="position: relative;"><button type="default" size="mini" class="m_online" @click="onlineProject(dataUser)">上线</button></th>
+						<th style="position: relative;"><button type="default" size="mini" class="m_delete" @click="deleteProject(dataUser)">删除</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="bShowLastPageBtn">上一页</text>
+				<text class="m_paging_item" :key="i" v-for="i in pageTotalNum" @click="paging(i)" :class="i==currentPage?'p_act':''">
 					{{i}}
 				</text>
-				<text class="m_paging_item m_paging_lower">下一页</text>
+				<text class="m_paging_item m_paging_lower" v-show="bShowNextPageBtn">下一页</text>
 			</view>
 		</view>
+		<popForm ref="popForm"></popForm>
+		<popAlert ref="popAlert"></popAlert>
 	</view>
 </template>
 
 <script>
+	import popForm from '@/components/popForm.vue'
+	import popAlert from '@/components/popAlert.vue'
 	export default {
 		name: "project",
+		components: {
+			popForm,
+			popAlert,
+		},
 		data() {
 			return {
-				index: 1,
-				checke: false
+				pageTotalNum:1,
+				currentPage:1,
+				totalItem:2,
+				dataUsers_all: [],
+				checke: false,
+				bShowLastPageBtn:false,
+				bShowNextPageBtn:false,
 			}
 		},
 		methods: {
-			paging(obj) {
-				this.index = obj;
+			paging(i) {
+				uni.showLoading({
+				    title: '加载中'  
+				});
+				
+				let fromIndex = this.totalItem*(i-1);
+				let toIndex = fromIndex+this.totalItem;
+				
+				let data = {
+					"UserID": mydata_userInfo.userID,
+					"BeginNum": fromIndex, //用户数组索引
+					"EndNum": toIndex, //用户数组索引结束
+					"ItemType":""//道具 角色 场景  空为全部
+				}
+				
+				uni.request({
+					header: {
+						'Content-Type': 'application/json;charset=UTF-8'
+					},
+					url: mydata_api + '/backstage/getprojects',
+					method: 'POST',
+					data: data,
+					dataType: 'json',
+					success: (res) => {
+						//100成功
+						if (res.data.Code == 100) {
+							console.log("请求全部项目", res);
+							this.dataUsers_all = res.data.Projects;
+							this.pageTotalNum = Math.ceil(res.data.AllNumOfList/this.totalItem);
+						}
+						//200失败
+						else {
+							console.log('suc200', res);
+						}
+						uni.hideLoading();
+						this.showNextOrLastPageBtn();
+					},
+					fail: (res) => {
+						console.log("请求失败****");	
+						uni.hideLoading();
+					}
+				});
+			},
+			initPage() {
+				this.paging(1);
+			},
+			showNextOrLastPageBtn()
+			{
+				if((this.pageTotalNum-this.totalItem)>0)
+				{
+					this.bShowLastPageBtn = false;
+					this.bShowNextPageBtn = false;
+					// console.log('0000')
+				}
+				else if(this.pageTotalNum==this.currentPage)
+				{
+					this.bShowLastPageBtn = true;
+					this.bShowNextPageBtn = false;
+					// console.log('11111')
+				}
+				else if(1==this.currentPage)
+				{
+					this.bShowLastPageBtn = false;
+					this.bShowNextPageBtn = true;
+					// console.log('2222')
+				}
+				else
+				{
+					this.bShowLastPageBtn = true;
+					this.bShowNextPageBtn = true;
+					// console.log('333333')
+				}
+			},
+			addProject()
+			{
+				uni.chooseFile({
+					success: (chooseFileRes) => 
+					{
+						console.log('选择文件成功')
+						const tempFilePaths = chooseFileRes.tempFilePaths;
+												
+						this.$refs.popForm.isShow(true);
+						this.$refs.popForm.setTitle('添加项目');
+						
+						let _self = this;
+						let callback = function(content_arr){
+							
+							let data = {
+								"CreateUserID":mydata_userInfo.userID,
+								"ProjectName":content_arr[0].input,
+								"Describe":content_arr[1].input,
+								"Type":content_arr[2].input,
+							}
+							
+							uni.showLoading({
+							    title: '上传中'  
+							});
+							
+							uni.uploadFile({
+								url: mydata_api + '/project/createprojectnew', 
+								filePath: tempFilePaths[0],
+								name: 'file',
+								formData:data,
+								success: (uploadFileRes) => {								
+									console.log("创建项目成功", uploadFileRes);
+									_self.paging(_self.currentPage);																	
+									uni.hideLoading();
+								},
+								fail: (res) => {
+									console.log("创建项目失败");
+									uni.hideLoading();
+								}
+							});
+						};
+						
+						this.$refs.popForm.setContent([
+							{
+								'name':'项目名称',
+								'input':'',
+								'type' :'text'
+							},
+							{
+								'name':'项目描述',
+								'input':'',
+								'type' :'text'
+							},
+							{
+								'name':'项目类型',
+								'input':'',
+								'type' :'text'
+							},
+						],callback);						
+					}
+				});
+			},
+			onlineProject(dataUser)
+			{
+				
+				// this.$refs.popAlert.isShow(true);
+				// this.$refs.popAlert.setTitle('提示');
+				// let _self = this;		
+				// let callback = function(){
+				// 	let data = {
+				// 		"UserID":mydata_userInfo.userID,
+				// 		"ProjectID" : dataUser.Id.toString()
+				// 	}
+					
+				// 	uni.showLoading({
+				// 	    title: '上线中'  
+				// 	});
+					
+				// 	uni.request({
+				// 		header: {
+				// 			'Content-Type': 'application/json;charset=UTF-8'
+				// 		},
+				// 		url: mydata_api + '/backstage/deleteproject',
+				// 		method: 'POST',
+				// 		data: data,
+				// 		dataType: 'json',
+				// 		success: (res) => {
+				// 			//100成功
+				// 			if (res.data.Code == 100) {
+				// 				console.log("上线成功", res);
+				// 				_self.paging(_self.currentPage);
+				// 			}
+				// 			//200失败
+				// 			else {
+				// 				console.log('上线失败200', res);
+				// 			}
+							
+				// 			uni.hideLoading();
+				// 		},
+				// 		fail: (res) => {
+				// 			console.log("上线失败");
+				// 			uni.hideLoading();
+				// 		}
+				// 	});
+				// }
+				
+				// this.$refs.popAlert.setContent('是否删除项目',callback);
+			},
+			deleteProject(dataUser)
+			{
+				this.$refs.popAlert.isShow(true);
+				this.$refs.popAlert.setTitle('提示');
+				let _self = this;		
+				let callback = function(){
+					let data = {
+						"UserID":mydata_userInfo.userID,
+						"ProjectID" : dataUser.Id.toString()
+					}
+					console.log('data=',data)
+					uni.showLoading({
+					    title: '删除中'  
+					});
+					
+					uni.request({
+						header: {
+							'Content-Type': 'application/json;charset=UTF-8'
+						},
+						url: mydata_api + '/backstage/deleteproject',
+						method: 'POST',
+						data: data,
+						dataType: 'json',
+						success: (res) => {
+							//100成功
+							if (res.data.Code == 100) {
+								console.log("删除项目成功", res);
+								_self.paging(_self.currentPage);
+							}
+							//200失败
+							else {
+								console.log('删除项目失败200', res);
+							}
+							
+							uni.hideLoading();
+						},
+						fail: (res) => {
+							console.log("删除项目失败");
+							uni.hideLoading();
+						}
+					});
+				}
+				
+				this.$refs.popAlert.setContent('是否删除项目',callback);
 			}
 		}
 	}
@@ -168,8 +332,12 @@
 	}
 
 	tbody tr {
-		border-top: 2rpx solid #DDDDDD !important;
-
+		// border-top: 2rpx solid #DDDDDD !important;
+		border: 2rpx solid #DDDDDD !important;
+	}
+	
+	th {
+		border: 2rpx solid #DDDDDD !important;
 	}
 
 	tbody tr th {
@@ -178,11 +346,11 @@
 		line-height: 140rpx;
 	}
 
-	tbody tr:hover {
-		// color: #fff;
-		background: #FDEBEC;
-		// opacity: 0.08;
-	}
+	// tbody tr:hover {
+	// 	// color: #fff;
+	// 	background: #FDEBEC;
+	// 	// opacity: 0.08;
+	// }
 
 	.m-table-hander {
 		background-color: #FFF8F7;
@@ -193,32 +361,33 @@
 	}
 
 	.m_edit {
-		position: absolute;
-		top: 50%;
-		left: 50%;
-		transform: translate(-50%, -50%);
+		// position: absolute;
+		// top: 50%;
+		// left: 50%;
+		// transform: translate(-50%, -50%);
 		background: rgb(67, 127, 250);
 		color: rgb(255, 255, 255);
-		min-width: 130rpx;
+		// min-width: 130rpx;
 	}
 
 	.m_delete {
-		position: absolute;
-		top: 50%;
-		left: 50%;
-		min-width: 130rpx;
-		transform: translate(-50%, -50%);
+		// position: absolute;
+		// top: 50%;
+		// left: 50%;
+		// min-width: 130rpx;
+		// transform: translate(-50%, -50%);
 		background: rgb(234, 37, 44);
 		color: rgb(255, 255, 255);
 	}
 
 	.m_online {
+		// background: #437FFA;
+		// position: absolute;
+		// top: 50%;
+		// left: 50%;
+		// min-width: 130rpx;
+		// transform: translate(-50%, -50%);
 		background: #437FFA;
-		position: absolute;
-		top: 50%;
-		left: 50%;
-		min-width: 130rpx;
-		transform: translate(-50%, -50%);
 		color: rgb(255, 255, 255);
 	}
 

+ 445 - 114
components/manager/user.vue

@@ -1,13 +1,14 @@
 <template>
 	<view class="m_right">
 		<view class="m_right_hander">
-			<button size="mini" class="m_btn_red">添加用户</button>
+			<button size="mini" class="m_btn_red" @click="addUser()">添加用户</button>
 		</view>
 		<view class="m_right_container">
 			<table style="width: 100%;border: 1px solid #DDDDDD;border-collapse: collapse">
 				<thead class="m-table-hander">
 					<tr>
-						<th>用户名</th>
+						<!-- <th>用户名</th> -->
+						<th>姓名</th>
 						<th>班级</th>
 						<th>学号</th>
 						<th>电话</th>
@@ -19,110 +20,426 @@
 					</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>
-						<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 v-for="(dataUser,dataUserI) in dataUsers_all" :key="dataUserI">
+						<!-- <th style="color: #EA252C;">{{dataUser.IlabAccount}}</th> -->
+						<th>{{dataUser.Name}}</th>
+						<th>{{dataUser.Class}}</th>
+						<th>{{dataUser.StudentID}}</th>
+						<th>{{dataUser.PhoneNum}}</th>
+						<th>{{dataUser.IlabAccount}}</th>
+						<th>{{dataUser.SignTime}}</th>
+						<th>{{dataUser.TotalScore}}</th>
+						<th class="btn_bg"><button type="default" size="mini" class="m_edit" @click="modify(dataUser)">修改</button></th>
+						<th class="btn_bg"><button type="default" size="mini" class="m_delete" @click="deleteUser(dataUser)">删除</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="bShowLastPageBtn">上一页</text>
+				<!-- <text class="m_paging_item" :key="i" v-for="i in pageTotalNum" @click="paging(i)" :class="i==index?'p_act':''"> -->
+				<text class="m_paging_item" :key="i" v-for="i in pageTotalNum" @click="paging(i)" :class="i==currentPage?'p_act':''">
 					{{i}}
 				</text>
-				<text class="m_paging_item m_paging_lower">下一页</text>
+				<text class="m_paging_item m_paging_lower" v-show="bShowNextPageBtn">下一页</text>
 			</view>
 		</view>
+		<popForm ref="popForm"></popForm>
+		<popAlert ref="popAlert"></popAlert>
 	</view>
 </template>
 
 <script>
+	import popForm from '@/components/popForm.vue'
+	import popAlert from '@/components/popAlert.vue'
+	
 	export default {
 		name: "manager_user",
+		components: {
+			popForm,
+			popAlert,
+		},
 		data() {
 			return {
-				index: 1,
+				pageTotalNum:1,
+				currentPage:1,
+				totalItem:2,
+				dataUsers_all: [],
+				bShowLastPageBtn:false,
+				bShowNextPageBtn:false,
 			}
 		},
 		methods: {
-			paging(obj) {
-				this.index = obj;
-			}
+			paging(i) {
+				// console.log('index=',i)
+				uni.showLoading({
+				    title: '加载中'  
+				});
+				
+				let fromIndex = this.totalItem*(i-1);
+				let toIndex = fromIndex+this.totalItem;
+				
+				let data = {
+					"UserID": mydata_userInfo.userID,
+					"BeginNum": fromIndex, //用户数组索引
+					"EndNum": toIndex //用户数组索引结束
+				}
+				// console.log('data===',data)
+				uni.request({
+					header: {
+						'Content-Type': 'application/json;charset=UTF-8'
+					},
+					url: mydata_api + '/backstage/getalluser',
+					method: 'POST',
+					data: data,
+					dataType: 'json',
+					success: (res) => {
+						//100成功
+						if (res.data.Code == 100) {
+							console.log("请求全部用户res", res);
+							this.dataUsers_all = res.data.Users;
+							this.pageTotalNum = Math.ceil(res.data.AllNumOfList/this.totalItem);
+							this.setTotalScore();
+							this.currentPage = i;
+							uni.hideLoading();
+							
+							this.showNextOrLastPageBtn();
+						}
+						//200失败
+						else {
+							console.log('suc200', res);
+							uni.hideLoading();
+						}
+					},
+					fail: (res) => {
+						console.log("请求失败****");
+						uni.hideLoading();
+					}
+				});
+			},
+			initPage() {
+				this.paging(1);
+			},
+			//分数合并
+			setTotalScore() {
+				for (let i = 0; i < this.dataUsers_all.length; i++) {
+					let totalScore = 0;
+					for (let j = 0; j < this.dataUsers_all[i].UserScore.length; j++) {
+						let ascore = Number(this.dataUsers_all[i].UserScore[j]);
+						if (ascore) {
+							totalScore += ascore;
+						}
+					}
+					this.dataUsers_all[i].TotalScore = totalScore;
+				}
+			},
+			showNextOrLastPageBtn()
+			{
+				if((this.pageTotalNum-this.totalItem)>0)
+				{
+					this.bShowLastPageBtn = false;
+					this.bShowNextPageBtn = false;
+					// console.log('0000')
+				}
+				else if(this.pageTotalNum==this.currentPage)
+				{
+					this.bShowLastPageBtn = true;
+					this.bShowNextPageBtn = false;
+					// console.log('11111')
+				}
+				else if(1==this.currentPage)
+				{
+					this.bShowLastPageBtn = false;
+					this.bShowNextPageBtn = true;
+					// console.log('2222')
+				}
+				else
+				{
+					this.bShowLastPageBtn = true;
+					this.bShowNextPageBtn = true;
+					// console.log('333333')
+				}
+			},
+			addUser(){
+				this.$refs.popForm.isShow(true);
+				this.$refs.popForm.setTitle('添加用户');
+				let _self = this;
+				let callback = function(content_arr){
+					let data = {
+						"IlabAccount":content_arr[0].input,
+						"UserID" : content_arr[1].input,        
+						"SetUserID":content_arr[2].input,        
+						"Name":content_arr[3].input,              
+						"School":content_arr[4].input,       
+						"Department":content_arr[5].input,  
+						"Profession":content_arr[6].input,    
+						"Class":content_arr[7].input,          
+						"StudentID":content_arr[8].input,       
+						"Post":content_arr[9].input,            
+						"PhoneNum":content_arr[10].input,
+						"Email":content_arr[11].input,
+						"Nation":content_arr[12].input,             
+						"PoliticsStatus":content_arr[13].input, 
+						"NativePlace":content_arr[14].input,   
+						"Certificate":content_arr[15].input,
+						"CertificateNum":content_arr[16].input,
+					}
+					// console.log('data===',data)
+					
+					uni.showLoading({
+					    title: '上传中'  
+					});
+					
+					uni.request({
+						header: {
+							'Content-Type': 'application/json;charset=UTF-8'
+						},
+						url: mydata_api + '/backstage/addusers',
+						method: 'POST',
+						data: data,
+						dataType: 'json',
+						success: (res) => {
+							//100成功
+							if (res.data.Code == 100) {
+								console.log("添加用户成功", res);
+								_self.paging(_self.currentPage);
+							}
+							//200失败
+							else {
+								console.log('添加用户成功失败200', res);	
+							}
+							uni.hideLoading();
+						},
+						fail: (res) => {
+							console.log("添加用户成功失败");
+							uni.hideLoading();
+						}
+					});
+				};
+				
+				this.$refs.popForm.setContent([
+					{
+						'name':'Ilab账号',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'设置用户',
+						'input':mydata_userInfo.userID,
+						'type' :'text'
+					},
+					{
+						'name':'被设置用户ID',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'姓名',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'学校',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'院系',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'专业',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'班级',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'学号',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'Post',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'职务',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'电话',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'邮箱',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'民族',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'政治面貌',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'籍贯',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'证件类型',
+						'input':'',
+						'type' :'text'
+					},
+					{
+						'name':'证件号码',
+						'input':'',
+						'type' :'text'
+					}
+				],callback);	
+			},
+			modify(dataUser)
+			{
+				this.$refs.popForm.isShow(true);
+				this.$refs.popForm.setTitle('修改用户信息');
+				
+				let _self = this;
+				
+				let callback = function(content_arr){
+					
+						let data = {
+							"UserID":mydata_userInfo.userID,
+							"SetUserID" : dataUser.Id,
+							"Name":content_arr[0].input,
+							"School":dataUser.School,
+							"Department":dataUser.Department,
+							"Profession":dataUser.Profession,
+							"Class":content_arr[1].input,
+							"StudentID":content_arr[2].input,
+							"Post":dataUser.Post,
+							"PhoneNum":content_arr[3].input,
+							"Email":dataUser.Email,
+							"Nation":dataUser.Nation,
+							"PoliticsStatus":dataUser.PoliticsStatus,
+							"NativePlace":dataUser.NativePlace,
+							"Certificate":dataUser.Certificate,
+							"CertificateNum":dataUser.CertificateNum,
+						}
+						
+						uni.showLoading({
+						    title: '上传中'  
+						});
+						
+						uni.request({
+							header: {
+								'Content-Type': 'application/json;charset=UTF-8'
+							},
+							url: mydata_api + '/user/setuserinfo',
+							method: 'POST',
+							data: data,
+							dataType: 'json',
+							success: (res) => {
+								//100成功
+								if (res.data.Code == 100) {
+									console.log("修改用户信息成功", res);
+									_self.paging(_self.currentPage);
+								}
+								//200失败
+								else {
+									console.log('修改用户信息失败200', res);
+								}
+								
+								uni.hideLoading();
+							},
+							fail: (res) => {
+								console.log("修改用户信息失败");
+								uni.hideLoading();
+							}
+						});
+					
+				};
+				this.$refs.popForm.setContent([
+					
+					{
+						'name':'姓名',
+						'input':dataUser.Name,
+						'type' :'text'
+					},
+					{
+						'name':'班级',
+						'input':dataUser.Class,
+						'type' :'text'
+					},
+					{
+						'name':'学号',
+						'input':dataUser.StudentID,
+						'type' :'text'
+					},
+					{
+						'name':'电话',
+						'input':dataUser.PhoneNum,
+						'type' :'text'
+					}
+				],callback);
+			},
+			deleteUser(dataUser)
+			{
+				this.$refs.popAlert.isShow(true);	
+				this.$refs.popAlert.setTitle('提示');
+				let _self = this;		
+				let callback = function(){
+					let data = {
+						"UserID":mydata_userInfo.userID,
+						"DeleteUserID" : dataUser.Id
+					}
+					
+					uni.showLoading({
+					    title: '上传中'  
+					});
+					
+					uni.request({
+						header: {
+							'Content-Type': 'application/json;charset=UTF-8'
+						},
+						url: mydata_api + '/backstage/deleteuser',
+						method: 'POST',
+						data: data,
+						dataType: 'json',
+						success: (res) => {
+							//100成功
+							if (res.data.Code == 100) {
+								console.log("删除用户成功", res);
+								_self.paging(_self.currentPage);
+							}
+							//200失败
+							else {
+								console.log('删除用户失败200', res);
+							}
+							
+							uni.hideLoading();
+						},
+						fail: (res) => {
+							console.log("删除用户失败");
+							uni.hideLoading();
+						}
+					});
+				}
+				
+				this.$refs.popAlert.setContent('是否删除用户',callback);
+			},
 		}
 	}
 </script>
@@ -134,12 +451,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 +469,36 @@
 				color: #fff;
 			}
 		}
-	
 	}
+
 	tbody tr {
-		border-top: 2rpx solid #DDDDDD !important;
-	
+		// border-top: 2rpx solid #DDDDDD !important;
+		border: 2rpx solid #DDDDDD !important;
+	}
+
+	th {
+		border: 2rpx solid #DDDDDD !important;
 	}
 	
 	tbody tr th {
 		font-weight: 400 !important;
 		height: 140rpx;
 		line-height: 140rpx;
+		border: 2rpx solid #DDDDDD !important;
 	}
-	
-	tbody tr:hover {
-		// color: #fff;
-		background: #FDEBEC;
-		// opacity: 0.08;
+
+	// tbody tr:hover {
+	// 	// color: #fff;
+	// 	background: #FDEBEC;
+	// 	// opacity: 0.08;
+	// }
+
+	.center{
+		display: flex;
+		justify-content: center;
+		align-items: center;
 	}
-	
+
 	.m-table-hander {
 		background-color: #FFF8F7;
 		height: 140rpx;
@@ -178,55 +506,58 @@
 		font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
 		font-weight: bold;
 	}
-	
+	.btn_bg{
+		// border: 1rpx solid #DDDDDD;
+		
+		// display: flex;
+		// justify-content: center;
+		// align-items: center;
+	}
 	.m_edit {
-		position: absolute;
-		top: 50%;
-		left: 50%;
-		transform: translate(-50%, -50%);
+		// position: relative;
+		// top: 50%;
+		// left: 50%;
+		// transform: translate(-50%, -50%);
 		background: rgb(67, 127, 250);
 		color: rgb(255, 255, 255);
-		min-width: 130rpx;
+		// width: 60%;
 	}
-	
+
 	.m_delete {
-		position: absolute;
-		top: 50%;
-		left: 50%;
-		min-width: 130rpx;
-		transform: translate(-50%, -50%);
 		background: rgb(234, 37, 44);
 		color: rgb(255, 255, 255);
+		// width: 60%;
 	}
-	
+
 	.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;
 	}
+	
 </style>

+ 95 - 77
components/manager/zc.vue

@@ -19,83 +19,18 @@
 					</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>
-						<th>CMII09</th>
-						<th>26</th>
-						<th>15038728747</th>
-						<th>2021-01-01</th>
-						<th>90</th>
+					<tr v-for="(dataUser,dataUserI) in dataUsers_all" :key="dataUserI">
+						<th style="color: #EA252C;">dataUser.Name</th>
+						<th>dataUser.Id</th>
+						<th>dataUser.Id</th>
+						<th>dataUser.Id</th>
+						<th>dataUser.Id</th>
+						<th>dataUser.Id</th>
+						<th>dataUser.Id</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>
+					
 				</tbody>
 			</table>
 		</view>
@@ -116,12 +51,95 @@
 		name: "manager_zc",
 		data() {
 			return {
-				index: 1,
+				pageTotalNum:1,
+				currentPage:0,
+				totalItem:2,
+				dataUsers_all: []
 			}
 		},
 		methods: {
-			paging(obj) {
-				this.index = obj;
+			paging(i) {
+				uni.showLoading({
+				    title: '加载中'  
+				});
+				
+				let fromIndex = this.totalItem*(i-1);
+				let toIndex = fromIndex+this.totalItem;
+				
+				let data = {
+					"UserID": mydata_userInfo.userID,
+					"BeginNum": 0, //用户数组索引
+					"EndNum": 15, //用户数组索引结束
+					"ItemType":""//道具 角色 场景  空为全部
+				}
+				
+				uni.request({
+					header: {
+						'Content-Type': 'application/json;charset=UTF-8'
+					},
+					url: mydata_api + '/item/getitemlist',
+					method: 'POST',
+					data: data,
+					dataType: 'json',
+					success: (res) => {
+						//100成功
+						if (res.data.Code == 100) {
+							console.log("请求全部用户", res);
+							this.dataUsers_all = res.data.Users;
+							this.pageTotalNum = parseInt(res.data.AllNumOfList/this.totalItem);
+						}
+						//200失败
+						else {
+							console.log('suc200', res);
+						}
+						uni.hideLoading();
+					},
+					fail: (res) => {
+						console.log("请求失败****");	
+						uni.hideLoading();
+					}
+				});
+			},
+			initPage() {
+				
+				uni.showLoading({
+				    title: '加载中'  
+				});
+				
+				let data = {
+					"UserID": mydata_userInfo.userID,
+					"BeginNum": 0, //用户数组索引
+					"EndNum": 15, //用户数组索引结束
+					"ItemType":""//道具 角色 场景  空为全部
+				}
+				
+				uni.request({
+					header: {
+						'Content-Type': 'application/json;charset=UTF-8'
+					},
+					url: mydata_api + '/item/getitemlist',
+					method: 'POST',
+					data: data,
+					dataType: 'json',
+					success: (res) => {
+						//100成功
+						if (res.data.Code == 100) {
+							console.log("请求全部用户", res);
+							this.dataUsers_all = res.data.Users;
+							this.pageTotalNum = parseInt(res.data.AllNumOfList/this.totalItem);
+							uni.hideLoading();
+						}
+						//200失败
+						else {
+							console.log('suc200', res);
+							uni.hideLoading();
+						}
+					},
+					fail: (res) => {
+						console.log("请求失败****");	
+						uni.hideLoading();
+					}
+				});
 			}
 		}
 	}

+ 137 - 0
components/popAlert.vue

@@ -0,0 +1,137 @@
+<template>
+	<view class="root" catchtouchmove='return' v-if="bShow">
+		<!-- 背景黑幕 -->
+		<view class="blackBg" @click="close()"></view>
+		<!-- 背景 -->
+		<view class="formBg">
+			<!-- 标题 -->
+			<view class="titleBg">
+				<view class="title">{{title}}</view>
+			</view>
+			<!-- 内容 -->
+			<view class="middle">{{content}}</view>
+			<!-- 按钮区 -->
+			<view class="btnArea">
+				<button type="default" size="mini" class="confirm" @click="confirm()">确定</button>
+				<button type="default" size="mini" class="cancel" @click="cancel()">取消</button>
+			</view>
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				bShow:false,
+				title:'标题',
+				// content:'内容',
+				callback:null
+			}
+		},
+		methods: {
+			isShow(bShow){
+				this.bShow = bShow;	
+			},
+			setTitle(title){
+				this.title = title;
+			},
+			setContent(content,callback){
+				this.content = content;
+				this.callback = callback;
+			},
+			close(){
+				// this.bShow = !this.bShow;
+			},
+			confirm(){			
+				this.bShow = !this.bShow;
+				this.callback();
+			},
+			cancel(){
+				this.bShow = !this.bShow;
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	.root{	
+		width: 100%;
+		height: 100%;
+		
+		position: absolute;
+		top:0;
+		left:0;
+		z-index: 1;
+		
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+	.blackBg{
+		width: 100%;
+		height: 100%;
+		
+		opacity: 0.5;
+		background-color: #000000;
+	}
+	.formBg{
+		position: absolute;
+		width: 20%;
+		
+		background-color: #ffffff;
+		
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		flex-direction: column;
+	}
+	.titleBg{
+		width: 100%;
+		
+		background-color: #ff0000;
+		
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+	.title{
+		color: #ffffff;
+		font-size: 30rpx;
+		margin: 5%;
+		
+		// border:1px solid  #000000;
+	}
+	.middle{
+		width: 100%;
+		// height: 100%;	
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		
+		font-weight: 400 !important;
+		margin: 5%;
+		// border:1px solid  #000000;
+	}
+	.btnArea{
+		width: 100%;
+		// height: 10%;
+		// border:1px solid  #000000;
+		
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
+		flex-direction: row;
+		
+		margin-bottom: 5%;
+	}
+	.confirm{
+		background: rgb(234, 37, 44);
+		color: rgb(255, 255, 255);
+	}
+	.cancel{
+		background: rgb(234, 37, 44);
+		color: rgb(255, 255, 255);
+	}
+</style>

+ 343 - 0
components/popForm.vue

@@ -0,0 +1,343 @@
+<template>
+	<view class="root" catchtouchmove='return' v-if="bShow">
+		<!-- 背景黑幕 -->
+		<view class="blackBg" @click="close()"></view>
+		<!-- 背景 -->
+		<view class="formBg">
+			<!-- 标题 -->
+			<view class="titleBg">
+				<view class="title">{{title}}</view>
+			</view>
+			<!-- 表单 -->
+			<view class="middle">
+				<!-- 上一页 -->
+				<view style="width: 10%;height: 100%;margin: 3%;">
+					<view class="lastPage" @click="lastPage()" v-show="bLastPageShow"></view>
+				</view>
+				<view class="form">
+					<view class="item" v-for="(obj,index) in curr_content_arr" :key="index">
+						<view class="inputName">{{obj.name}}:</view>
+						<view class="inputBg">
+							<input type="text" v-model="obj.input" placeholder=""> 
+						</view>
+					</view>				
+				</view>
+				<!-- 下一页 -->
+				<view style="width: 10%;height: 100%;margin: 3%;">
+					<view class="nextPage" @click="nextPage()" v-show="bNextPageShow"></view>
+				</view>
+			</view>
+			<!-- 按钮区 -->
+			<view class="btnArea">
+				<button type="default" size="mini" class="confirm" @click="confirm()">确定</button>
+				<button type="default" size="mini" class="cancel" @click="cancel()">取消</button>
+			</view>
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				bShow:false,
+				title:'标题',
+				content_arr:[
+					{
+						'name':'11111',
+						'input':'aaa',
+						'type' :'text'
+					}
+				],
+				curr_content_arr:[],
+				curr_page:1,
+				total_page:0,
+				itemNumPerPage:5,
+				bLastPageShow:true,
+				bNextPageShow:true,
+				callback:null
+			}
+		},
+		methods: {
+			isShow(bShow){
+				this.bShow = bShow;
+				
+				this.content_arr.length = 0;
+				this.curr_content_arr.length = 0;
+				this.curr_page = 1;
+				this.total_page = 0;
+				this.itemNumPerPage = 5;
+				this.bLastPageShow = true;
+				this.bNextPageShow = true;
+				this.callback = null;
+			},
+			setTitle(title){
+				this.title = title;
+			},
+			setContent(content_arr,callback){
+				this.content_arr = content_arr;
+	
+				this.total_page = Math.ceil(this.content_arr.length/this.itemNumPerPage);		
+				
+				let length = this.content_arr.length;
+				if(length>this.itemNumPerPage)
+				{
+					length = this.itemNumPerPage;
+					
+				}
+				console.log('length=',length)
+				for(let i = 0;i<length;i++){
+					this.curr_content_arr.push(this.content_arr[i]);
+				}
+				
+				this.showNextOrLastPageBtn();
+				
+				this.callback = callback;
+			},
+			
+			close(){
+				// this.bShow = !this.bShow;
+			},
+			confirm(){
+				for(let i=0;i<this.content_arr.length;i++){
+					if(this.content_arr[i].input=='')
+					{
+						alert(this.content_arr[i].name+'不能为空');
+						return;
+					}
+				}
+				
+				this.bShow = !this.bShow;
+				this.callback(this.content_arr);
+			},
+			cancel(){
+				this.bShow = !this.bShow;
+			},
+			lastPage(){
+				this.curr_page--;
+				this.curr_content_arr.length=0;
+				
+				let fromIndex = (this.curr_page-1)*this.itemNumPerPage;
+				let toIndex = fromIndex+this.itemNumPerPage;
+				
+				for(let i = fromIndex;i<toIndex;i++){
+					this.curr_content_arr.push(this.content_arr[i]);
+				}
+				
+				this.showNextOrLastPageBtn();
+			},
+			nextPage(){		
+				this.curr_page++;
+				this.curr_content_arr.length=0;
+				let totalItemNum = this.content_arr.length;
+				
+				let nextPageItemNum = (totalItemNum-(this.curr_page-1)*this.itemNumPerPage)
+				if(nextPageItemNum>this.itemNumPerPage)
+				{
+					nextPageItemNum = this.itemNumPerPage;
+				}
+				
+				let fromIndex = (this.curr_page-1)*this.itemNumPerPage-1;
+				let toIndex = fromIndex+this.itemNumPerPage;
+				if(toIndex>totalItemNum)
+				{
+					toIndex = totalItemNum - 1;
+				}
+				
+				// console.log('from='+fromIndex+';To='+toIndex)
+				
+				for(let i = fromIndex;i<toIndex;i++){
+					this.curr_content_arr.push(this.content_arr[i]);
+				}
+				// console.log('totalItemNum=',totalItemNum)
+				// console.log('this.curr_content_arr=',this.curr_content_arr)
+				this.showNextOrLastPageBtn();
+			},
+			showNextOrLastPageBtn()
+			{
+				if((this.total_page-this.itemNumPerPage)>0)
+				{
+					this.bLastPageShow = false;
+					this.bNextPageShow = false;
+					// console.log('0000')
+				}
+				else if(this.total_page==this.curr_page)
+				{
+					this.bLastPageShow = true;
+					this.bNextPageShow = false;
+					// console.log('11111')
+				}
+				else if(1==this.curr_page)
+				{
+					this.bLastPageShow = false;
+					this.bNextPageShow = true;
+					// console.log('2222')
+				}
+				else
+				{
+					this.bLastPageShow = true;
+					this.bNextPageShow = true;
+					// console.log('333333')
+				}
+			},
+		},
+	}
+</script>
+
+<style lang="scss">
+	.root{	
+		width: 100%;
+		height: 100%;
+		
+		position: absolute;
+		top:0;
+		left:0;
+		z-index: 1;
+		
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+	.blackBg{
+		width: 100%;
+		height: 100%;
+		
+		opacity: 0.5;
+		background-color: #000000;
+	}
+	.formBg{
+		position: absolute;
+		width: 45%;
+
+		background-color: #ffffff;
+		
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		flex-direction: column;
+	}
+	.titleBg{
+		width: 100%;
+		height: 10%;
+		
+		background-color: #ff0000;
+		
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+	.title{
+		color: #ffffff;
+		font-size: 40rpx;
+		margin: 5%;
+		
+		// border:1px solid  #000000;
+	}
+	.middle{
+		width: 100%;
+		height: 100%;	
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		flex-direction: row;
+		
+		// border:1px solid  #000000;
+	}
+	.nextPage{
+		border: 20rpx solid;
+		border-color:transparent transparent transparent #ff0000;
+		width:0px;
+		height:0px;
+	}
+	.lastPage{		
+		border: 20rpx solid;
+		border-color:transparent transparent transparent #ff0000;
+		width:0px;
+		height:0px;
+		
+		-moz-transform:scaleX(-1);
+		-webkit-transform:scaleX(-1);
+		-o-transform:scaleX(-1);
+		transform:scaleX(-1);
+		/*兼容IE*/
+		filter:FlipH;
+		
+		// border:1px solid  #000000;
+	}
+	.form{
+		width: 80%;
+
+		margin-top: 5%;
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
+		flex-direction: column;
+		
+		// border:1px solid  #000000;
+	}
+	.item{
+		width: 100%;
+		
+		margin: 5%;
+		
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: row;
+		
+		// border:1px solid #ff0000;	
+	}
+	
+	.inputName{	
+		width: 20%;
+		
+		font-size: 20rpx;
+		font-weight:bold;
+		// 换行
+		word-break:break-all;
+		// word-break:keep-all;
+		
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+		
+		// border:1px solid  #000000;
+	}
+	.inputBg{
+		// border:1px solid  #000000;
+		box-shadow: 1px 1px 5px #888888;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		
+		width: 80%;
+
+		margin-left: 5%;
+	}
+	.item input{
+		width: 80%;
+		height: 80%;
+	}
+	
+	.btnArea{
+		width: 100%;
+		// height: 10%;
+		// border:1px solid  #000000;
+		
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
+		flex-direction: row;
+		
+		margin: 5%;
+	}
+	.confirm{
+		background: rgb(234, 37, 44);
+		color: rgb(255, 255, 255);
+	}
+	.cancel{
+		background: rgb(234, 37, 44);
+		color: rgb(255, 255, 255);
+	}
+</style>

+ 40 - 7
components/topMenu.vue

@@ -3,9 +3,9 @@
 	<view class="topMenuBox df jcsb">
 		<view class="df fdr">
 			<!-- 左侧导航icon -->
-			<view class="df aic jcc topMenu-lefticon" @click="onTopMenuIconClick">
+			<!-- <view class="df aic jcc topMenu-lefticon" @click="onTopMenuIconClick">
 				<img src="../assets/topMenu/leftUpIcon.png" />
-			</view>
+			</view> -->
 			<!-- 左上角标题 -->
 			<view class="df aic topMenu-lefttitle-box">
 				<view v-show="middleShowIndex==0">影视现场实时特效虚拟仿真实验</view>
@@ -75,15 +75,35 @@
 			<view v-show="loginShowIndex==0" class="df jcc aic btnLogin" id="btnLogin" @click="onLoginClick">登录</view>
 			<!-- 头像名字 -->
 			<view v-show="loginShowIndex==1" class="df aic">
-				<view>
+				<!-- <view>
 					<img src="../assets/topMenu/introductionToTheExperimentChecked.png" />
 				</view>
 				<view class="topMenu-rightbox-text">学生</view>
 				<view>
 					<img src="../assets/topMenu/arrowDown.png" />
-				</view>
+				</view> -->
+				<view>{{account}}</view>
 			</view>
 		</view>
+		<!-- 右侧登录或个人头像名字等 -->
+		<!-- <view class="df jcc aic topMenu-rightbox"> -->
+			<!-- 原理认知页面-返回上一层 -->
+			<!-- <view class="ylrz-return df aic fdr" v-show="returnShowIndex==1" @click="onClick_return">
+				<view class="df">
+					<img src="../assets/topMenu/icon_return.png" />
+				</view>
+				<view class="ylrz-return-text">返回</view>
+				<view class="ylrz-return-line"></view>
+			</view> -->
+			<!-- 登录按钮 -->
+			<!-- <view v-show="loginShowIndex==0" class="df jcc aic btnLogin" id="btnLogin" @click="onLoginClick">登录</view> -->
+			<!-- 头像名字 -->
+			<!-- <view v-show="loginShowIndex==1" class="df aic">
+				<view class="topMenu-avatar df" @click="onClick_avatar">
+					<img :src="mydata_userInfo.avatarSrc" />
+				</view>
+			</view>
+		</view> -->
 	</view>
 </template>
 
@@ -92,7 +112,7 @@
 		data() {
 			return {
 				//中间导航状态 0首页1前序准备2学习与实验3原理认知
-				middleShowIndex: 0,
+				middleShowIndex: 9,
 
 				// //右侧显示信息0登录按钮1个人头像信息2返回上一层
 				// rightShowIndex: 0,
@@ -103,6 +123,7 @@
 				// visibleLogin: true,
 				// visibleInfo: false,
 				visibleMiddle: true,
+				account:'',
 
 				curTitleSrc: [
 					require("../assets/topMenu/introductionToTheExperimentUnchecked.png"),
@@ -155,6 +176,9 @@
 			onLoginClick() {
 				this.$emit("onLoginClick");
 			},
+			onClick_avatar() {
+				this.isShow_userWindow = !this.isShow_userWindow;
+			},
 			//首页标题点击
 			onTitleClick_SY(index) {
 				// console.log("点击了", index);
@@ -182,12 +206,14 @@
 					// this.visibleInfo = true;
 					// this.switchRightState(1);
 					this.loginShowIndex = 1;
+					this.account=mydata_userInfo.account;
 				} else {
 					// this.visibleLogin = true;
 					// this.visibleInfo = false;
 					// this.switchRightState(0);
 					this.loginShowIndex = 0;
 				}
+				// console.log("切换登录状态",mydata_userInfo.account);
 			},
 			//切换中间导航状态
 			switchMiddleState(state) {
@@ -254,8 +280,8 @@
 				// console.log("学习与实验topmenu",index);
 			},
 			onTopMenuIconClick() {
-				this.$emit("onTopMenuIconClick");
-				console.log("顶部icon点击");
+				// this.$emit("onTopMenuIconClick");
+				// console.log("顶部icon点击");
 			},
 			//原理认知-返回上一层:返回到开始学习-学习与实验的展开页 type-3
 			//实验简介-返回上一层:返回到实验简介的展开页 type-4
@@ -277,6 +303,7 @@
 		width: 100%;
 		// height: px2vw(119);
 		// height: 11%;
+		height: 6.2vw;
 		background: #FFFFFF;
 		box-shadow: 3px 0px 6px 0px rgba(0, 0, 0, 0.1);
 		position: fixed;
@@ -379,4 +406,10 @@
 		color: #EA252C;
 		margin-left: px2vw(14);
 	}
+	
+	.topMenu-avatar img {
+		width: px2vw(50);
+		height: px2vw(50);
+		border-radius: px2vw(25);
+	}
 </style>

+ 2 - 1
main.js

@@ -21,4 +21,5 @@ import './myData.js';
 import './myData/myData_QXZB.js';
 import './myData/myData_XXYSY.js';
 import './myData/myData_XXYSY_YLRZ.js';
-import './myData/myData_SYJJ.js';
+import './myData/myData_SYJJ.js';
+import './request.js';

+ 16 - 0
myData.js

@@ -9,3 +9,19 @@ topMenuS = {
 	"home_1": '虚拟仿真1号摄影棚',
 	"home_2": "虚拟仿真资产库",
 }
+mydata_userInfo={
+	"account":null,
+	"UserID":''
+}
+// mydata_userInfo = {
+// 	"account":null,
+// 	"avatarSrc": require('assets/login/loginPic3.png'),
+// 	"role": '老师',
+// 	"Name": "张林",
+// 	"UserID": "12321zxc",
+// 	"email":'',
+// 	"Position":''
+// }
+
+// mydata_api='http://39.105.166.141:8085'
+mydata_api='http://8.140.128.1:8085'

+ 5 - 219
pages/home.vue

@@ -4,17 +4,8 @@
 		 v-on:onTopXXYSYClick="onTopXXYSYClick" v-on:onTopMenuIconClick="onTopMenuIconClick" v-on:onClick_return="onClick_return"></TopMenu>
 		<view class="content homeContent">
 			<Login ref="Login" v-show="bShow[0]" v-on:onLogin="onLogin"></Login>
-			<SYJJ ref="SYJJ" v-show="bShow[1]" v-on:onClick_Btn1="onClick_SYJJ_btn1"></SYJJ>
-			<XXLC ref="XXLC" v-show="bShow[2]"></XXLC>
-			<KSXX ref="KSXX" v-show="bShow[3]" v-on:on2thTitleClick="on2thKSXXClick"></KSXX>
 			<image v-show="bShow[4]" class="homeBG" mode="aspectFill" src="../assets/home/homeBG.png"></image>
-			<QXZB ref="QXZB" v-show="bShow[5]"></QXZB>
-			<XXYSY ref="XXYSY" v-show="bShow[6]" v-on:onClick_KSRZ="onClick_KSRZ"></XXYSY>
-			<YLRZ ref="YLRZ" v-show="bShow[7]"></YLRZ>
-			<SYJJ2 ref="SYJJ2" v-show="bShow[8]"></SYJJ2>
 			<manager ref="manager" v-show="bShow[9]"></manager>
-			<simulation ref="simulation" v-show="bShow[10]"></simulation>
-			<simulationLibrary ref="simulationLibrary" v-show="bShow[11]"></simulationLibrary>
 		</view>
 		<!-- 左侧导航栏永远保持在最上层 -->
 		<LeftMenu ref="LeftMenu" v-on:onLeftMenuClick="onLeftMenuClick"></LeftMenu>
@@ -26,41 +17,16 @@
 	import TopMenu from '../components/topMenu.vue'
 	import Login from '../components/login/login.vue'
 	import manager from '../components/manager/Index.vue'
-	import simulation from "../components/home/simulation.vue"
-	import simulationLibrary from "../components/home/simulationLibrary.vue"
-
-	//一级页面
-	import KSXX from '../components/startLearning/startLearning.vue' //开始学习
-	import SYJJ from '../components/introductionToTheExperiment/introductionToTheExperiment.vue' //实验简介
-	import XXLC from '../components/learningProcess/learningProcess.vue' //学习流程
-
-	//二级页面
-	//开始学习
-	import QXZB from '../components/startLearning/preludePreparation/preludePreparation.vue' //前序准备
-	import XXYSY from '../components/startLearning/learningAndExperiment/learningAndExperiment.vue' //学习与实验
-	import YLRZ from '../components/startLearning/learningAndExperiment/ksxx_xxysy_ylrz/ksxx_xxysy_ylrz.vue' //原理认知
-	//实验简介的详情页
-	import SYJJ2 from '../components/introductionToTheExperiment/syjj_second.vue' //实验简介的详情页
-
+	
 	export default {
 		components: {
 			LeftMenu,
 			TopMenu,
 			Login,
-			SYJJ,
-			XXLC,
-			KSXX,
-			QXZB,
-			XXYSY,
-			YLRZ,
-			SYJJ2,
 			manager,
-			simulation,
-			simulationLibrary
 		},
 		data() {
 			return {
-				curShowPage: 4,
 				//这里记录当前需要显示哪个页面。每新添加一个页面,都需要在这里注册。
 				bShow: [
 					false, //0登录
@@ -75,44 +41,15 @@
 					false, //9后台
 					false, //虚拟仿真1号摄影棚
 					false, //虚拟仿真库
-				],
-				// bShowLogin: true, //登录
-				// bShowSYJJ: false, //实验简介一级页面
-				// bShowXXLC: false, //学习流程一级页面
-				// bShowSL: false, //开始学习一级页面
-				checkedIndex_SYJJ: 0, //实验简介选中标题索引值
+				]
 			}
 		},
 		methods: {
-			onTopSYClick(index) {
-
-				console.log("点击了首页标题", index, myData_QXZB_SYQY.length);
-				let pageIndex = -1;
-				switch (index) {
-					case 0: //实验简介
-						pageIndex = 1;
-						// this.$refs.SYJJ.initData();
-						break;
-					case 1: //学习流程
-						pageIndex = 2;
-						// this.$refs.XXLC.initData();
-						break;
-					case 2: //开始学习
-						pageIndex = 3;
-						this.$refs.KSXX.initData();
-						break;
-					case 4:
-
-						break;
-					default:
-						console.log("选中状态为home:", state);
-				}
-				this.showPage(pageIndex);
-			},
 			onLogin: function() {
-				console.log("登陆成功home");
+				// console.log("登陆成功home");
 				this.$refs.TopMenu.switchLoginState(true);
-				this.showPage(4);
+				this.showPage(9);
+				this.$refs.manager.onLogin();
 			},
 			showPage(index) {
 				this.curShowPage = index;
@@ -126,157 +63,6 @@
 				// console.log("显示页面", index, this.bShow, this.bShow.length);
 				this.$forceUpdate();
 			},
-			//2级开始学习标题点击事件
-			on2thKSXXClick(data) {
-				// console.log("2级点击",data);
-				let lineIndex = data.indexOf("-");
-				let type = data.substr(0, lineIndex)
-				let index = data.substr(lineIndex + 1, data.length - 1)
-				console.log("2级点击home---", type, index);
-				//前序准备
-				if (type == "QXZB") {
-					this.showPage(5)
-					this.$refs.TopMenu.switchMiddleState(topMenuS.QXZB);
-					this.$refs.QXZB.onTopQXZBClick(index);
-					this.$refs.TopMenu.checkedIndexQXZB = index;
-				}
-				//学习与实验
-				else if (type == "XXYSY") {
-					this.showPage(6)
-					this.$refs.TopMenu.switchMiddleState(topMenuS.XXYSY);
-					this.$refs.XXYSY.onTopXXYSYClick(index);
-					this.$refs.TopMenu.checkedIndexXXYSY = index;
-				} else {
-					console.log("2级点击---", lineIndex, type, index);
-				}
-			},
-			//顶部前序准备小标题点击事件
-			onTopQXZBClick(index) {
-				// console.log("顶部点击home",index);
-				this.$refs.QXZB.onTopQXZBClick(index);
-			},
-			//顶部学习与实验小标题点击事件
-			onTopXXYSYClick(index) {
-				// console.log("顶部点击home",index);
-				this.$refs.XXYSY.onTopXXYSYClick(index);
-			},
-			//左侧导航点击事件
-			onLeftMenuClick(indexArr) {
-				debugger;
-				let targetPage = -1;
-				let topMiddleState = '';
-				switch (indexArr[0]) {
-					case 0: //首页
-						if (indexArr[1] == 0) {
-							targetPage = 10;
-							topMiddleState = topMenuS.home_1;
-						} else if (indexArr[1] == 1) {
-							targetPage = 11;
-							topMiddleState = topMenuS.home_2;
-						} else if (indexArr[1] == 2) {
-
-						} else if (indexArr[1] == 3) {
-
-						} else {
-							targetPage = 4;
-							topMiddleState = topMenuS.SY;
-						}
-						break;
-					case 1: //实验简介
-						targetPage = 8;
-						topMiddleState = topMenuS.SYJJ;
-						this.$refs.SYJJ2.showPage(indexArr[1]);
-						this.$refs.TopMenu.switchState_syjj(indexArr[1]);
-						// this.$forceUpdate();
-						break;
-					case 2: //学习流程
-
-						break;
-					case 3: //开始学习
-						if (indexArr[1] == 0) {
-							targetPage = 5;
-							topMiddleState = topMenuS.QXZB;
-						} else if (indexArr[1] == 1) {
-							targetPage = 6;
-							topMiddleState = topMenuS.XXYSY;
-						}
-						break;
-					case 4:
-						targetPage = 9;
-						topMiddleState = topMenuS.manager;
-						break;
-					default:
-						console.log("展示页面home:", this.curShowPage);
-				}
-				this.showPage(targetPage);
-				this.$refs.TopMenu.switchMiddleState(topMiddleState);
-				console.log("左侧导航点击home", indexArr);
-			},
-			//顶部导航左上角icon点击事件
-			onTopMenuIconClick() {
-				let indexArr = [];
-				switch (this.curShowPage) {
-					case 0: //登录
-						indexArr = [-1, -1];
-						break;
-					case 1: //实验简介1级
-						indexArr = [1, -1];
-						break;
-					case 2: //学习流程1级
-						indexArr = [2, -1];
-						break;
-					case 3: //开始学习1级
-						indexArr = [3, -1];
-						break;
-					case 4: //首页
-						indexArr = [0, -1];
-						break;
-					case 5: //开始学习-前序准备
-						indexArr = [3, 0];
-						break;
-					case 6: //开始学习-学习与实验
-						indexArr = [3, 1];
-						break;
-					case 7: //开始学习-学习与实验-原理认知
-						indexArr = [3, 1];
-						break;
-					case 8: //实验简介2级
-						indexArr = [1, this.checkedIndex_SYJJ];
-						break;
-					default:
-						console.log("展示页面home:", this.curShowPage);
-				}
-				this.$refs.LeftMenu.show(indexArr);
-			},
-			//开始学习-学习与实验-开始认知按钮
-			onClick_KSRZ() {
-				this.showPage(7);
-				this.$refs.TopMenu.switchMiddleState(topMenuS.YLRZ);
-				// this.$refs.TopMenu.switchRightState(2);
-			},
-			//原理认知-返回上一层:返回到开始学习-学习与实验的展开页
-			onClick_return(type) {
-				switch (type) {
-					case 3: //原理认知-返回上一层:返回到开始学习-学习与实验的展开页 
-						this.showPage(3);
-						this.$refs.KSXX.switchSecondTitle(1);
-						break;
-					case 4: //实验简介-返回上一层:返回到实验简介的展开页
-						this.showPage(1);
-						break;
-					default:
-						console.log("返回类型", type);
-				}
-			},
-			//实验简介按钮点击
-			onClick_SYJJ_btn1(index) {
-				this.showPage(8);
-				this.checkedIndex_SYJJ = index;
-				this.$refs.SYJJ2.showPage(index);
-				this.$refs.TopMenu.switchMiddleState(topMenuS.SYJJ);
-				this.$refs.TopMenu.switchState_syjj(index);
-				this.$forceUpdate();
-			}
 		}
 	}
 </script>