Просмотр исходного кода

更新后台 资产用户项目

zxp19960123 4 лет назад
Родитель
Сommit
a3012156c3
3 измененных файлов с 63 добавлено и 71 удалено
  1. 17 9
      components/manager/Index.vue
  2. 45 61
      components/manager/assets.vue
  3. 1 1
      components/manager/user.vue

+ 17 - 9
components/manager/Index.vue

@@ -133,20 +133,22 @@
  
 			
 		</view>-->
-		<user ref="user" v-if="routerIndex==1"></user>
-		<zc ref="zc" v-if="routerIndex==2"></zc>
+		<user ref="user" v-show="routerDataIndex==1"></user>
+		<assets ref="assets" v-show="routerDataIndex==2"></assets>
+		<project ref="project" v-show="routerDataIndex==3"></project>
 	</view>
 </template>
 
 <script>
 	import user from "./user.vue"
-	import zc from "./zc.vue"
+	import assets from "./assets.vue"
+	import project from "./project.vue"
 	export default {
-		name: "manager",
+		name: "manager_index",
 		props: [],
 		data() {
 			return {
-				routerIndex: 1,
+				routerDataIndex: 1,
 				name: '张林老师',
 				position: '计算机系',
 				menu: [{
@@ -169,16 +171,22 @@
 		},
 		components: {
 			user,
-			zc
+			assets,
+			project
 		},
 		created() {
 
 		},
 		methods: {
 			checkMenu(obj) {
-				this.menu.forEach(p => p.select = false);
-				obj.select = true;
-				this.routerIndex = obj.id;
+				this.menu.forEach(p => {
+					if (p.id == obj.id) {
+						p.select = true;
+						this.routerDataIndex = obj.id;
+					} else {
+						p.select = false;
+					}
+				});
 			},
 
 		}

+ 45 - 61
components/manager/assets.vue

@@ -7,93 +7,63 @@
 			<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>
+						<th>资产名称</th>
+						<th>上传人</th>
+						<th>上传时间</th>
 						<th>删除</th>
 					</tr>
 				</thead>
 				<tbody>
 					<tr>
-						<th style="color: #EA252C;">张小旭</th>
-						<th>26</th>
+						<th>
+							<image class="m_logoimg" src="../../assets/topMenu/introductionToTheExperimentUnchecked.png" mode=""></image>
+						</th>
 						<th>CMII09</th>
-						<th>26</th>
-						<th>15038728747</th>
+						<th>张小旭</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>张小旭</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>张小旭</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>张小旭</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>张小旭</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>张小旭</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>张小旭</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>
@@ -102,7 +72,7 @@
 		<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':''">
+				<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>
@@ -113,7 +83,7 @@
 
 <script>
 	export default {
-		name: "manager_zc",
+		name: "manager_assets",
 		data() {
 			return {
 				index: 1,
@@ -134,12 +104,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 +122,30 @@
 				color: #fff;
 			}
 		}
-	
+
 	}
+
 	tbody tr {
 		border-top: 2rpx solid #DDDDDD !important;
-	
+
+	}
+
+	tbody tr th:first-child {
+		position: relative;
 	}
-	
+
 	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 +153,7 @@
 		font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
 		font-weight: bold;
 	}
-	
+
 	.m_edit {
 		position: absolute;
 		top: 50%;
@@ -188,7 +163,7 @@
 		color: rgb(255, 255, 255);
 		min-width: 130rpx;
 	}
-	
+
 	.m_delete {
 		position: absolute;
 		top: 50%;
@@ -198,34 +173,43 @@
 		background: rgb(234, 37, 44);
 		color: rgb(255, 255, 255);
 	}
-	
+
 	.m_right_footer {
 		margin-top: 80rpx;
 	}
-	
+
+	.m_logoimg {
+		width: 80rpx;
+		height: 80rpx;
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%,-50%);
+	}
+
 	.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;
 	}

+ 1 - 1
components/manager/user.vue

@@ -102,7 +102,7 @@
 		<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':''">
+				<text class="m_paging_item" :key="i" v-for="i in 8" @click="paging(i)" :class="i==index?'p_act':''">
 					{{i}}
 				</text>
 				<text class="m_paging_item m_paging_lower">下一页</text>