补充页面内容
This commit is contained in:
@@ -1,22 +1,268 @@
|
||||
<template>
|
||||
<AdminLayout currentPage="dev-config-category">
|
||||
<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>
|
||||
<view class="filter-select">
|
||||
<text class="select-placeholder">请选择</text>
|
||||
<text class="arrow">▼</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-item">
|
||||
<text class="label">分类名称:</text>
|
||||
<input class="filter-input" placeholder="请输入分类名称" />
|
||||
</view>
|
||||
<button class="btn primary" @click="onSearch">查询分类</button>
|
||||
</view>
|
||||
<view class="filter-row mt-12">
|
||||
<view class="filter-item">
|
||||
<text class="label">配置名称:</text>
|
||||
<input class="filter-input" placeholder="请输入配置名称" />
|
||||
</view>
|
||||
<button class="btn primary" @click="onSearchConfig">查询配置</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<text class="tip">TODO: 配置分类</text>
|
||||
|
||||
<!-- 内容区 -->
|
||||
<view class="admin-card content-card">
|
||||
<!-- 操作按钮行 -->
|
||||
<view class="action-bar">
|
||||
<button class="btn primary small" @click="onAdd">添加配置分类</button>
|
||||
</view>
|
||||
|
||||
<!-- 表格 -->
|
||||
<view class="table-container list-table">
|
||||
<view class="table-header">
|
||||
<view class="col col-id"><text>ID</text></view>
|
||||
<view class="col col-name"><text>分类名称</text></view>
|
||||
<view class="col col-field"><text>分类字段</text></view>
|
||||
<view class="col col-status"><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-name">
|
||||
<text class="expand-icon" v-if="item.hasChildren">▶</text>
|
||||
<text>{{ item.name }}</text>
|
||||
</view>
|
||||
<view class="col col-field"><text>{{ item.field }}</text></view>
|
||||
<view class="col col-status">
|
||||
<switch :checked="item.status" color="#1890ff" scale="0.8" />
|
||||
</view>
|
||||
<view class="col col-ops">
|
||||
<text class="op-link" @click="onConfig(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>
|
||||
</AdminLayout>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
|
||||
</script>
|
||||
<style scoped>
|
||||
.page { padding: 16px; }
|
||||
.title { font-size: 18px; font-weight: 600; }
|
||||
.tip { color: #999; margin-top: 8px; display: block; }
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const dataList = ref([
|
||||
{ id: 9, name: '分销配置', field: 'fenxiao', status: true, hasChildren: true },
|
||||
{ id: 65, name: '接口设置', field: 'system_serve', status: true, hasChildren: true },
|
||||
{ id: 69, name: '客服配置', field: 'kefu_config', status: true, hasChildren: true },
|
||||
{ id: 78, name: '应用配置', field: 'sys_app', status: true, hasChildren: true },
|
||||
{ id: 100, name: '用户配置', field: 'system_user_config', status: true, hasChildren: true },
|
||||
{ id: 113, name: '订单配置', field: 'order_config', status: true, hasChildren: true },
|
||||
{ id: 129, name: '系统配置', field: 'system_config', status: true, hasChildren: true },
|
||||
{ id: 136, name: '商品配置', field: 'product_config', status: true, hasChildren: true }
|
||||
])
|
||||
|
||||
function onSearch() {
|
||||
uni.showToast({ title: '查询分类', icon: 'none' })
|
||||
}
|
||||
|
||||
function onSearchConfig() {
|
||||
uni.showToast({ title: '查询配置', icon: 'none' })
|
||||
}
|
||||
|
||||
function onAdd() {
|
||||
uni.showToast({ title: '添加配置分类', icon: 'none' })
|
||||
}
|
||||
|
||||
function onConfig(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 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;
|
||||
}
|
||||
|
||||
.mt-12 { margin-top: 12px; }
|
||||
|
||||
.filter-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-right: 24px;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.filter-select {
|
||||
width: 200px;
|
||||
height: 32px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.select-placeholder {
|
||||
color: #bfbfbf;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
font-size: 10px;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.filter-input {
|
||||
width: 200px;
|
||||
height: 32px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
padding: 0 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.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-name { flex: 2; }
|
||||
.col-field { flex: 2; }
|
||||
.col-status { width: 100px; justify-content: center; }
|
||||
.col-ops { flex: 2; justify-content: flex-end; }
|
||||
|
||||
.expand-icon {
|
||||
margin-right: 8px;
|
||||
font-size: 10px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.op-link {
|
||||
color: #1890ff;
|
||||
cursor: pointer;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.op-danger {
|
||||
color: #ff4d4f;
|
||||
}
|
||||
|
||||
.op-divider {
|
||||
color: #f0f0f0;
|
||||
margin: 0 4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +1,192 @@
|
||||
<template>
|
||||
<AdminLayout currentPage="dev-config-cron">
|
||||
<view class="page">
|
||||
<view class="header">
|
||||
<text class="title">定时任务</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<text class="tip">TODO: 定时任务</text>
|
||||
<view class="admin-page">
|
||||
<view class="admin-sections">
|
||||
<!-- 顶部通知 -->
|
||||
<view class="admin-card alert-card">
|
||||
<view class="alert-content">
|
||||
<text class="alert-title">启动定时任务两种方式:</text>
|
||||
<text class="alert-desc">1、使用命令行启动:php think timer start --d; 如果更改了执行周期、编辑是否开启、删除定时任务需要重新启动下定时任务确保生效;</text>
|
||||
<text class="alert-desc">2、使用接口触发定时任务,建议每分钟调用一次,接口地址 https://v5.crmeb.net/api/crontab/run</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 操作卡片 -->
|
||||
<view class="admin-card content-card">
|
||||
<view class="tabs-row">
|
||||
<view class="tab-item active"><text>系统任务</text></view>
|
||||
<view class="tab-item"><text>自定义任务</text></view>
|
||||
</view>
|
||||
|
||||
<!-- 表格 -->
|
||||
<view class="table-container list-table mt-16">
|
||||
<view class="table-header">
|
||||
<view class="col col-title"><text>标题</text></view>
|
||||
<view class="col col-desc"><text>任务说明</text></view>
|
||||
<view class="col col-cycle"><text>执行周期</text></view>
|
||||
<view class="col col-status"><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-title"><text>{{ item.title }}</text></view>
|
||||
<view class="col col-desc"><text>{{ item.desc }}</text></view>
|
||||
<view class="col col-cycle"><text>{{ item.cycle }}</text></view>
|
||||
<view class="col col-status">
|
||||
<switch :checked="item.status" color="#1890ff" scale="0.8" />
|
||||
</view>
|
||||
<view class="col col-ops">
|
||||
<text class="op-link" @click="onEdit(item)">编辑</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 分页 -->
|
||||
<view class="pagination">
|
||||
<text class="page-info">共 10 条 15条/页</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="uts">
|
||||
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page { padding: 16px; }
|
||||
.title { font-size: 18px; font-weight: 600; }
|
||||
.tip { color: #999; margin-top: 8px; display: block; }
|
||||
</style>
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const dataList = ref([
|
||||
{ id: 1, title: '自动开具/冲红电子发票', desc: '每隔10分钟执行自动开具/冲红电子发票', cycle: '每隔10分钟执行一次', status: true },
|
||||
{ id: 2, title: '清除昨日海报', desc: '每天0时30分0秒执行一次清除昨日海报', cycle: '每天0时30分0秒执行一次', status: true },
|
||||
{ id: 3, title: '订单商品自动好评', desc: '每隔5分钟执行订单到期商品好评', cycle: '每隔5分钟执行一次', status: true },
|
||||
{ id: 4, title: '预售商品到期自动下架', desc: '每隔5分钟执行预售商品到期下架', cycle: '每隔5分钟执行一次', status: true },
|
||||
{ id: 5, title: '订单自动收货', desc: '每隔5分钟执行订单到期自动收货', cycle: '每隔5分钟执行一次', status: true },
|
||||
{ id: 6, title: '自动更新直播间状态', desc: '每隔3分钟执行更新直播间状态', cycle: '每隔3分钟执行一次', status: true },
|
||||
{ id: 7, title: '自动更新直播商品状态', desc: '每隔3分钟执行更新直播商品状态', cycle: '每隔3分钟执行一次', status: true },
|
||||
{ id: 8, title: '到期自动解绑上级', desc: '每隔1分钟执行到期的绑定关系的解除', cycle: '每隔1分钟执行一次', status: true },
|
||||
{ id: 9, title: '拼团到期订单处理', desc: '每隔1分钟拼团到期后的操作', cycle: '每隔1分钟执行一次', status: true },
|
||||
{ id: 10, title: '未支付自动取消订单', desc: '每隔30秒执行自动取消到期未支付的订单', cycle: '每隔30秒执行一次', status: true }
|
||||
])
|
||||
|
||||
function onEdit(item: any) {
|
||||
uni.showToast({ title: '编辑: ' + item.title, icon: 'none' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<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;
|
||||
}
|
||||
|
||||
.alert-card {
|
||||
background-color: #fffbe6;
|
||||
border: 1px solid #ffe58f;
|
||||
}
|
||||
|
||||
.alert-content {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.alert-title {
|
||||
font-size: 14px;
|
||||
color: #faad14;
|
||||
margin-bottom: 8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.alert-desc {
|
||||
font-size: 13px;
|
||||
color: #faad14;
|
||||
line-height: 20px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.tabs-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
padding: 12px 20px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
.tab-item.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -1px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 2px;
|
||||
background-color: #1890ff;
|
||||
}
|
||||
|
||||
.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-title { flex: 2; }
|
||||
.col-desc { flex: 3; }
|
||||
.col-cycle { flex: 2; }
|
||||
.col-status { width: 100px; justify-content: center; }
|
||||
.col-ops { width: 80px; justify-content: center; }
|
||||
|
||||
.op-link {
|
||||
color: #1890ff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.page-info {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.mt-16 { margin-top: 16px; }
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +1,155 @@
|
||||
<template>
|
||||
<AdminLayout currentPage="dev-config-event">
|
||||
<view class="page">
|
||||
<view class="header">
|
||||
<text class="title">自定事件</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<text class="tip">TODO: 自定事件</text>
|
||||
<view class="admin-page">
|
||||
<view class="admin-sections">
|
||||
<!-- 提示语 -->
|
||||
<view class="admin-card alert-card">
|
||||
<text class="alert-title">自定义事件说明:</text>
|
||||
<text class="alert-desc">1、新增的事件会在对应的事件类型相关的流程中触发,例:选择用户登录,则在用户登录时执行代码。</text>
|
||||
<text class="alert-desc">2、可以使用对应事件类型中的参数,例:$data['nickname'], $data['phone']等。</text>
|
||||
<text class="alert-desc">3、调用类的时请写入完整路径,例:\think\facade\Db、\app\services\other\CacheServices::class等。</text>
|
||||
</view>
|
||||
|
||||
<!-- 内容区 -->
|
||||
<view class="admin-card content-card">
|
||||
<!-- 操作按钮行 -->
|
||||
<view class="action-bar">
|
||||
<button class="btn primary small" @click="onAdd">新增系统事件</button>
|
||||
</view>
|
||||
|
||||
<!-- 表格(暂无数据) -->
|
||||
<view class="table-container list-table">
|
||||
<view class="table-header">
|
||||
<view class="col col-id"><text>编号</text></view>
|
||||
<view class="col col-name"><text>事件名</text></view>
|
||||
<view class="col col-type"><text>事件类型</text></view>
|
||||
<view class="col col-status"><text>是否开启</text></view>
|
||||
<view class="col col-time"><text>创建时间</text></view>
|
||||
<view class="col col-ops"><text>操作</text></view>
|
||||
</view>
|
||||
|
||||
<view class="table-body">
|
||||
<view class="empty-row">
|
||||
<text class="empty-text">暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="uts">
|
||||
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page { padding: 16px; }
|
||||
.title { font-size: 18px; font-weight: 600; }
|
||||
.tip { color: #999; margin-top: 8px; display: block; }
|
||||
<script setup lang="uts">
|
||||
function onAdd() {
|
||||
uni.showToast({ title: '新增系统事件', icon: 'none' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<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;
|
||||
}
|
||||
|
||||
.alert-card {
|
||||
background-color: #fff7e6;
|
||||
border: 1px solid #ffd591;
|
||||
}
|
||||
|
||||
.alert-title {
|
||||
font-size: 14px;
|
||||
color: #fa8c16;
|
||||
margin-bottom: 8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.alert-desc {
|
||||
font-size: 13px;
|
||||
color: #fa8c16;
|
||||
line-height: 20px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.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-name { flex: 2; }
|
||||
.col-type { flex: 2; }
|
||||
.col-status { width: 100px; justify-content: center; }
|
||||
.col-time { flex: 2; }
|
||||
.col-ops { width: 100px; justify-content: center; }
|
||||
|
||||
.empty-row {
|
||||
height: 200px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 14px;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +1,122 @@
|
||||
<template>
|
||||
<AdminLayout currentPage="dev-config-module">
|
||||
<view class="page">
|
||||
<view class="header">
|
||||
<text class="title">模块配置</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<text class="tip">TODO: 模块配置</text>
|
||||
<view class="admin-page">
|
||||
<view class="admin-sections">
|
||||
<view class="admin-card content-card">
|
||||
<view class="form-container">
|
||||
<view class="form-item">
|
||||
<view class="form-label">模块配置:</view>
|
||||
<view class="form-content">
|
||||
<label class="checkbox-item">
|
||||
<checkbox color="#1890ff" checked />
|
||||
<text class="checkbox-label">秒杀</text>
|
||||
</label>
|
||||
<label class="checkbox-item">
|
||||
<checkbox color="#1890ff" checked />
|
||||
<text class="checkbox-label">砍价</text>
|
||||
</label>
|
||||
<label class="checkbox-item">
|
||||
<checkbox color="#1890ff" checked />
|
||||
<text class="checkbox-label">拼团</text>
|
||||
</label>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-tip">
|
||||
模块配置,选中展示对应的模块,取消选中则前后端不展示模块相关内容
|
||||
</view>
|
||||
<view class="form-actions">
|
||||
<button class="btn primary" @click="onSubmit">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
|
||||
</script>
|
||||
function onSubmit() {
|
||||
uni.showToast({ title: '已提交', icon: 'none' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.admin-page {
|
||||
padding: 20px;
|
||||
background-color: #f5f7f9;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.admin-card {
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 40px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.form-container {
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.form-content {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.checkbox-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.checkbox-label {
|
||||
margin-left: 8px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.form-tip {
|
||||
font-size: 12px;
|
||||
color: #bfbfbf;
|
||||
margin-left: 100px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
margin-left: 100px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
.page { padding: 16px; }
|
||||
.title { font-size: 18px; font-weight: 600; }
|
||||
.tip { color: #999; margin-top: 8px; display: block; }
|
||||
</style>
|
||||
|
||||
|
||||
@@ -1,22 +1,263 @@
|
||||
<template>
|
||||
<AdminLayout currentPage="dev-config-permission">
|
||||
<view class="page">
|
||||
<view class="header">
|
||||
<text class="title">权限维护</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<text class="tip">TODO: 权限维护</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>
|
||||
<view class="filter-select">
|
||||
<text class="select-placeholder">请选择</text>
|
||||
<text class="arrow">▼</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-item">
|
||||
<text class="label">按钮名称:</text>
|
||||
<input class="filter-input" placeholder="请输入按钮名称" />
|
||||
</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 list-table">
|
||||
<view class="table-header">
|
||||
<view class="col col-name"><text>按钮名称</text></view>
|
||||
<view class="col col-auth"><text>前项权限</text></view>
|
||||
<view class="col col-route"><text>路由</text></view>
|
||||
<view class="col col-status"><text>规则状态</text></view>
|
||||
<view class="col col-memo"><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-name">
|
||||
<text class="expand-icon">▶</text>
|
||||
<text>{{ item.name }}</text>
|
||||
</view>
|
||||
<view class="col col-auth"><text>{{ item.auth }}</text></view>
|
||||
<view class="col col-route"><text>{{ item.route }}</text></view>
|
||||
<view class="col col-status">
|
||||
<switch :checked="item.status" color="#1890ff" scale="0.8" />
|
||||
</view>
|
||||
<view class="col col-memo"><text>{{ item.memo }}</text></view>
|
||||
<view class="col col-ops">
|
||||
<text class="op-link" @click="onSelectAuth(item)">选择权限</text>
|
||||
<view class="op-divider">|</view>
|
||||
<text class="op-link" @click="onAddSub(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>
|
||||
</view>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="uts">
|
||||
import AdminLayout from '@/layouts/admin/AdminLayout.uvue'
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page { padding: 16px; }
|
||||
.title { font-size: 18px; font-weight: 600; }
|
||||
.tip { color: #999; margin-top: 8px; display: block; }
|
||||
<script setup lang="uts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
const dataList = ref([
|
||||
{ id: 1, name: '主页', auth: 'admin-home', route: '菜单: /admin/index', status: true, memo: '主页' },
|
||||
{ id: 2, name: '用户', auth: 'admin-user', route: '菜单: /admin/user', status: true, memo: '用户' },
|
||||
{ id: 3, name: '订单', auth: 'admin-order', route: '菜单: /admin/order', status: true, memo: '订单' },
|
||||
{ id: 4, name: '商品', auth: 'admin-product', route: '菜单: /admin/product', status: true, memo: '商品' },
|
||||
{ id: 5, name: '营销', auth: 'admin-marketing', route: '菜单: /admin/marketing', status: true, memo: '营销' },
|
||||
{ id: 6, name: '分销', auth: 'admin-agent', route: '菜单: /admin/agent', status: true, memo: '分销' },
|
||||
{ id: 7, name: '客服', auth: 'setting-store-service', route: '菜单: /admin/kefu', status: true, memo: '客服' },
|
||||
{ id: 8, name: '财务', auth: 'admin-finance', route: '菜单: /admin/finance', status: true, memo: '财务' },
|
||||
{ id: 9, name: '内容', auth: 'admin-cms', route: '菜单: /admin/cms', status: true, memo: '内容' },
|
||||
{ id: 10, name: '装修', auth: 'admin-setting-pages', route: '菜单: /admin/setting/pages', status: true, memo: '装修' },
|
||||
{ id: 11, name: '应用', auth: 'admin-app', route: '菜单: /admin/app', status: true, memo: '应用' },
|
||||
{ id: 12, name: '设置', auth: 'admin-setting', route: '菜单: /admin/setting', status: true, memo: '设置' },
|
||||
{ id: 13, name: '维护', auth: 'admin-system', route: '菜单: /admin/system', status: true, memo: '维护' }
|
||||
])
|
||||
|
||||
function onSearch() {
|
||||
uni.showToast({ title: '查询中...', icon: 'none' })
|
||||
}
|
||||
|
||||
function onAdd() {
|
||||
uni.showToast({ title: '添加规则', icon: 'none' })
|
||||
}
|
||||
|
||||
function onSelectAuth(item: any) {
|
||||
uni.showToast({ title: '选择权限: ' + item.name, icon: 'none' })
|
||||
}
|
||||
|
||||
function onAddSub(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 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-select {
|
||||
width: 150px;
|
||||
height: 32px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.select-placeholder {
|
||||
color: #bfbfbf;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.filter-input {
|
||||
width: 200px;
|
||||
height: 32px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 2px;
|
||||
padding: 0 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.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-name { flex: 1.5; }
|
||||
.col-auth { flex: 2; }
|
||||
.col-route { flex: 3; }
|
||||
.col-status { width: 100px; justify-content: center; }
|
||||
.col-memo { flex: 1; }
|
||||
.col-ops { flex: 3; justify-content: flex-end; }
|
||||
|
||||
.expand-icon {
|
||||
margin-right: 8px;
|
||||
font-size: 10px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.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