补充页面内容
This commit is contained in:
@@ -1,23 +1,223 @@
|
||||
<template>
|
||||
<AdminLayout currentPage="dev-config-combo">
|
||||
<view class="page">
|
||||
<view class="header">
|
||||
<text class="title">组合数据</text>
|
||||
<view class="admin-page">
|
||||
<view class="admin-sections">
|
||||
<!-- 搜索栏 -->
|
||||
<view class="admin-card filter-card">
|
||||
<view class="filter-row">
|
||||
<view class="filter-item">
|
||||
<text class="label">数据搜索:</text>
|
||||
<input class="filter-input input-large" placeholder="请输入ID,KEY,数据组名称,简介" />
|
||||
</view>
|
||||
<button class="btn primary" @click="onSearch">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 内容区 -->
|
||||
<view class="admin-card content-card">
|
||||
<!-- 操作按钮行 -->
|
||||
<view class="action-bar">
|
||||
<button class="btn primary small" @click="onAdd">添加数据组</button>
|
||||
</view>
|
||||
|
||||
<!-- 表格 -->
|
||||
<view class="table-container">
|
||||
<view class="table-header">
|
||||
<view class="col col-id"><text>ID</text></view>
|
||||
<view class="col col-key"><text>KEY</text></view>
|
||||
<view class="col col-name"><text>数据组名称</text></view>
|
||||
<view class="col col-desc"><text>简介</text></view>
|
||||
<view class="col col-ops"><text>操作</text></view>
|
||||
</view>
|
||||
|
||||
<view class="table-body">
|
||||
<view v-for="item in dataList" :key="item.id" class="table-row">
|
||||
<view class="col col-id"><text>{{ item.id }}</text></view>
|
||||
<view class="col col-key"><text>{{ item.key }}</text></view>
|
||||
<view class="col col-name"><text>{{ item.name }}</text></view>
|
||||
<view class="col col-desc"><text>{{ item.desc }}</text></view>
|
||||
<view class="col col-ops">
|
||||
<text class="op-link" @click="onDataList(item)">数据列表</text>
|
||||
<view class="op-divider">|</view>
|
||||
<text class="op-link" @click="onEdit(item)">编辑</text>
|
||||
<view class="op-divider">|</view>
|
||||
<text class="op-link op-danger" @click="onDelete(item)">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<text class="tip">TODO: 组合数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const dataList = ref([
|
||||
{ id: 49, key: 'routine_seckill_time', name: '秒杀时间段', desc: '秒杀时间段' },
|
||||
{ id: 52, key: 'routine_home_bast_banner', name: '首页精品推荐图片', desc: '首页精品推荐图片' },
|
||||
{ id: 53, key: 'order_details_images', name: '订单详情状态图', desc: '订单详情状态图' },
|
||||
{ id: 54, key: 'routine_my_menus', name: '个人中心菜单', desc: '个人中心菜单' },
|
||||
{ id: 55, key: 'sign_day_num', name: '签到天数配置', desc: '签到天数配置' },
|
||||
{ id: 57, key: 'routine_home_hot_banner', name: '热门榜单推荐图片', desc: '热门榜单推荐图片' },
|
||||
{ id: 58, key: 'routine_home_new_banner', name: '首发新品推荐图片', desc: '首发新品推荐图片' },
|
||||
{ id: 59, key: 'routine_home_benefit_banner', name: '促销单品推荐图片', desc: '促销单品推荐图片' },
|
||||
{ id: 62, key: 'user_recharge_quota', name: '充值金额设置', desc: '设置充值金额额度选择' },
|
||||
{ id: 65, key: 'admin_login_slide', name: '后台登录页面幻灯片', desc: '后台登录页面幻灯片' },
|
||||
{ id: 66, key: 'uni_app_link', name: '前端页面链接', desc: '前端页面链接' },
|
||||
{ id: 67, key: 'combination_banner', name: '拼团列表轮播图', desc: '拼团列表轮播图' },
|
||||
{ id: 68, key: 'integral_shop_banner', name: '积分商城轮播图', desc: '积分商城轮播图' }
|
||||
])
|
||||
|
||||
function onSearch() {
|
||||
uni.showToast({ title: '查询中...', icon: 'none' })
|
||||
}
|
||||
|
||||
function onAdd() {
|
||||
uni.showToast({ title: '添加数据组', icon: 'none' })
|
||||
}
|
||||
|
||||
function onDataList(item: any) {
|
||||
uni.showToast({ title: '数据列表: ' + item.name, icon: 'none' })
|
||||
}
|
||||
|
||||
function onEdit(item: any) {
|
||||
uni.showToast({ title: '编辑: ' + item.name, icon: 'none' })
|
||||
}
|
||||
|
||||
function onDelete(item: any) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要删除该数据组吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.showToast({ title: '已删除', icon: 'none' })
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page { padding: 16px; }
|
||||
.title { font-size: 18px; font-weight: 600; }
|
||||
.tip { color: #999; margin-top: 8px; display: block; }
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
.admin-page {
|
||||
padding: 20px;
|
||||
background-color: #f5f7f9;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.admin-card {
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.filter-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.filter-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-right: 24px;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.filter-input {
|
||||
width: 200px;
|
||||
height: 32px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
padding: 0 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.input-large {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
height: 32px;
|
||||
padding: 0 20px;
|
||||
border-radius: 2px;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
border: 1px solid #d9d9d9;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.btn.primary {
|
||||
background-color: #1890ff;
|
||||
border-color: #1890ff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn.small {
|
||||
height: 28px;
|
||||
padding: 0 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.action-bar {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
width: 100%;
|
||||
border: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
background-color: #fafafa;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.table-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.col {
|
||||
padding: 12px 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.col-id { width: 80px; }
|
||||
.col-key { flex: 2; }
|
||||
.col-name { flex: 2; }
|
||||
.col-desc { flex: 2; }
|
||||
.col-ops { flex: 2; justify-content: flex-end; }
|
||||
|
||||
.op-link {
|
||||
color: #1890ff;
|
||||
cursor: pointer;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.op-danger {
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
.op-divider {
|
||||
color: #f0f0f0;
|
||||
margin: 0 4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user