补充页面
This commit is contained in:
@@ -1,23 +1,177 @@
|
||||
<template>
|
||||
<view class="admin-page-container">
|
||||
<view class="page-card">
|
||||
<view class="page-header">
|
||||
<text class="page-title">管理员列表</text>
|
||||
<!-- 搜索栏 -->
|
||||
<view class="search-wrap">
|
||||
<view class="search-item">
|
||||
<text class="label">状态:</text>
|
||||
<picker mode="selector" :range="statusRange" @change="onStatusChange">
|
||||
<view class="picker-input">{{ statusText }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="search-item">
|
||||
<text class="label">搜索:</text>
|
||||
<input class="input" placeholder="请输入姓名或者账号" v-model="searchKey" />
|
||||
</view>
|
||||
<button class="btn btn-primary" @click="onSearch">查询</button>
|
||||
</view>
|
||||
<view class="page-content">
|
||||
<text class="placeholder-text">管理员列表 页面开发中...</text>
|
||||
|
||||
<view class="action-wrap">
|
||||
<button class="btn btn-primary" @click="onAdd">添加管理员</button>
|
||||
</view>
|
||||
|
||||
<!-- 表格区域 -->
|
||||
<view class="table-wrap">
|
||||
<view class="table-header">
|
||||
<view class="th" style="flex: 2;">姓名</view>
|
||||
<view class="th" style="flex: 2;">账号</view>
|
||||
<view class="th" style="flex: 2;">身份</view>
|
||||
<view class="th" style="flex: 3;">最后一次登录时间</view>
|
||||
<view class="th" style="flex: 3;">最后一次登录ip</view>
|
||||
<view class="th" style="flex: 1;">开启</view>
|
||||
<view class="th" style="flex: 2;">操作</view>
|
||||
</view>
|
||||
<view class="table-body">
|
||||
<view class="no-data">
|
||||
<text class="no-data-text">暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const searchKey = ref('')
|
||||
const statusRange = ['所有', '启用', '禁用']
|
||||
const statusIndex = ref(0)
|
||||
const statusText = ref('请选择')
|
||||
|
||||
function onStatusChange(e: any) {
|
||||
statusIndex.value = parseInt(e.detail.value.toString())
|
||||
statusText.value = statusRange[statusIndex.value]
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
console.log('Search:', searchKey.value, statusText.value)
|
||||
}
|
||||
|
||||
function onAdd() {
|
||||
console.log('Add admin')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.admin-page-container { padding: 20px; background-color: #f5f7f9; min-height: 100vh; }
|
||||
.page-card { background-color: #fff; border-radius: 4px; padding: 20px; box-shadow: 0 1px 4px rgba(0,21,41,0.08); }
|
||||
.page-header { margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; }
|
||||
.page-title { font-size: 16px; font-weight: bold; color: #303133; }
|
||||
.placeholder-text { font-size: 14px; color: #909399; }
|
||||
.admin-page-container {
|
||||
padding: 15px;
|
||||
background-color: #f5f7f9;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.page-card {
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.search-wrap {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.search-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.picker-input {
|
||||
width: 150px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 220px;
|
||||
height: 32px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.btn {
|
||||
height: 32px;
|
||||
line-height: 30px;
|
||||
padding: 0 15px;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #1890ff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.action-wrap {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
width: 100%;
|
||||
border: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
background-color: #f8f8f9;
|
||||
}
|
||||
|
||||
.th {
|
||||
padding: 12px 10px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #515a6e;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-body {
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
.no-data {
|
||||
padding: 40px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.no-data-text {
|
||||
font-size: 14px;
|
||||
color: #c5c8ce;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user