feat(admin): complete integration of auth, delivery, and system infrastructure modules

This commit is contained in:
comlibmb
2026-02-18 23:30:39 +08:00
parent 7b27694690
commit 5d00e3d74e
37 changed files with 2830 additions and 1075 deletions

View File

@@ -6,157 +6,253 @@
</view>
<!-- 表格区域 -->
<view class="table-wrap">
<view class="table-wrap border-shadow">
<view class="table-header">
<view class="th" style="flex: 1;">ID</view>
<view class="th" style="flex: 1;">序号</view>
<view class="th" style="flex: 1.5;">头像</view>
<view class="th" style="flex: 2;">名称</view>
<view class="th" style="flex: 2.5;">手机号码</view>
<view class="th" style="flex: 1.5;">是否显示</view>
<view class="th" style="flex: 1.5;">状态</view>
<view class="th" style="flex: 3;">添加时间</view>
<view class="th" style="flex: 2;">操作</view>
</view>
<view class="table-body">
<view v-for="item in courierList" :key="item.id" class="tr">
<view class="td" style="flex: 1;">{{ item.id }}</view>
<view v-if="loading" class="loading-box">
<text>加载中...</text>
</view>
<view v-else-if="staffList.length === 0" class="no-data">
<text class="no-data-text">暂无配送员数据</text>
</view>
<view v-else v-for="(item, index) in staffList" :key="item.id" class="tr">
<view class="td" style="flex: 1;"><text class="td-txt">{{ (page - 1) * pageSize + index + 1 }}</text></view>
<view class="td" style="flex: 1.5;">
<image class="avatar" :src="item.avatar" mode="aspectFill" />
<image v-if="item.avatar" class="avatar" :src="item.avatar" mode="aspectFill" />
<view v-else class="avatar-placeholder"><text>👤</text></view>
</view>
<view class="td" style="flex: 2;">{{ item.name }}</view>
<view class="td" style="flex: 2.5;">{{ item.phone }}</view>
<view class="td" style="flex: 2;"><text class="td-txt">{{ item.nickname }}</text></view>
<view class="td" style="flex: 2.5;"><text class="td-txt">{{ item.phone }}</text></view>
<view class="td" style="flex: 1.5;">
<switch :checked="item.isshow" color="#1890ff" @change="onToggleShow(item)" />
<switch :checked="item.status === 1" color="#1890ff" scale="0.7" @change="onToggleStatus(item)" />
</view>
<view class="td" style="flex: 3;">{{ item.addTime }}</view>
<view class="td" style="flex: 3;"><text class="td-txt-small">{{ formatTime(item.created_at) }}</text></view>
<view class="td" style="flex: 2;">
<text class="action-btn" @click="onEdit(item)">编辑</text>
<text class="action-btn-del" @click="onDel(item)">删除</text>
<view class="divider"></view>
<text class="action-btn danger" @click="onDelete(item)">删除</text>
</view>
</view>
</view>
</view>
<!-- 分页栏 -->
<view class="pagination-footer">
<text class="total-txt">共 {{ total }} 条</text>
<view class="page-btns">
<text :class="['p-btn', page <= 1 ? 'disabled' : '']" @click="prevPage"> < </text>
<text class="p-btn active">{{ page }}</text>
<text :class="['p-btn', staffList.length < pageSize ? 'disabled' : '']" @click="nextPage"> > </text>
</view>
</view>
</view>
<!-- 添加/编辑 弹窗 -->
<view v-if="showModal" class="modal-overlay" @click="closeModal">
<view class="modal-card" @click.stop>
<view class="modal-header">
<text class="modal-title">{{ isEdit ? '编辑配送员' : '添加配送员' }}</text>
<text class="close-btn" @click="closeModal">×</text>
</view>
<view class="modal-body">
<view class="form-item">
<text class="f-label">名称:</text>
<input class="f-input" v-model="form.nickname" placeholder="请输入名称" />
</view>
<view class="form-item">
<text class="f-label">手机号:</text>
<input class="f-input" v-model="form.phone" type="number" placeholder="请输入手机号" />
</view>
<view class="form-item">
<text class="f-label">头像:</text>
<view class="upload-placeholder" @click="handleUpload">
<image v-if="form.avatar" :src="form.avatar" mode="aspectFill" class="avatar-preview" />
<text v-else>+</text>
</view>
</view>
</view>
<view class="modal-footer">
<button class="btn" @click="closeModal">取消</button>
<button class="btn btn-primary" @click="handleSave">保存</button>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref, reactive } from 'vue'
import { ref, reactive, onMounted } from 'vue'
import { fetchDeliveryStaffPage, saveDeliveryStaff, deleteDeliveryStaff, type DeliveryStaff } from '@/services/admin/deliveryService.uts'
type CourierItem = {
id: number
avatar: string
name: string
phone: string
isshow: boolean
addTime: string
const staffList = ref<DeliveryStaff[]>([])
const loading = ref(false)
const total = ref(0)
const page = ref(1)
const pageSize = 15
// Modal state
const showModal = ref(false)
const isEdit = ref(false)
const form = reactive({
id: '' as string | null,
nickname: '',
phone: '',
avatar: '',
status: 1
})
onMounted(() => {
loadData()
})
async function loadData() {
loading.value = true
try {
const res = await fetchDeliveryStaffPage(page.value, pageSize)
staffList.value = res.items
total.value = res.total
} catch (e) {
uni.showToast({ title: '加载失败', icon: 'none' })
} finally {
loading.value = false
}
}
const courierList = reactive<CourierItem[]>([
{ id: 106, avatar: '/static/logo.png', name: 'cheshi', phone: '18943652356', isshow: true, addTime: '2025-06-29 21:45:19' },
{ id: 105, avatar: '/static/logo.png', name: 'dl', phone: '15648569914', isshow: true, addTime: '2025-06-28 18:40:26' },
{ id: 102, avatar: '/static/logo.png', name: '小牛马', phone: '13548652258', isshow: true, addTime: '2025-06-26 15:14:40' }
])
function onAdd() {
console.log('Add courier')
isEdit.value = false
form.id = null
form.nickname = ''
form.phone = ''
form.avatar = ''
form.status = 1
showModal.value = true
}
function onToggleShow(item: CourierItem) {
item.isshow = !item.isshow
function onEdit(item : DeliveryStaff) {
isEdit.value = true
form.id = item.id
form.nickname = item.nickname
form.phone = item.phone
form.avatar = item.avatar || ''
form.status = item.status
showModal.value = true
}
function onEdit(item: CourierItem) {
console.log('Edit:', item.name)
function closeModal() {
showModal.value = false
}
function onDel(item: CourierItem) {
console.log('Delete:', item.id)
async function handleSave() {
if (!form.nickname || !form.phone) {
uni.showToast({ title: '请填写姓名和手机号', icon: 'none' })
return
}
loading.value = true
try {
const resId = await saveDeliveryStaff(form)
if (resId != null) {
uni.showToast({ title: '保存成功' })
closeModal()
loadData()
}
} finally {
loading.value = false
}
}
async function onDelete(item : DeliveryStaff) {
uni.showModal({
title: '提示',
content: `确定要删除配送员 "${item.nickname}" 吗?`,
success: async (res) => {
if (res.confirm) {
const ok = await deleteDeliveryStaff(item.id)
if (ok) {
uni.showToast({ title: '删除成功' })
loadData()
}
}
}
})
}
async function onToggleStatus(item : DeliveryStaff) {
const nextStatus = item.status === 1 ? 0 : 1
const ok = await saveDeliveryStaff({ ...item, status: nextStatus })
if (ok != null) {
item.status = nextStatus
uni.showToast({ title: '状态已更新' })
}
}
function prevPage() { if (page.value > 1) { page.value--; loadData(); } }
function nextPage() { if (staffList.value.length >= pageSize) { page.value++; loadData(); } }
function formatTime(iso : string | null) : string {
if (!iso) return '-'
return iso.substring(0, 16).replace('T', ' ')
}
function handleUpload() {
uni.showToast({ title: '上传功能开发中', icon: 'none' })
}
</script>
<style scoped>
.admin-page-container {
padding: 15px;
background-color: #f5f7f9;
min-height: 100vh;
}
<style scoped lang="scss">
.admin-page-container { padding: 24px; background-color: #f5f7f9; min-height: 100vh; }
.page-card { background-color: #fff; border-radius: 4px; padding: 24px; }
.page-card {
background-color: #fff;
border-radius: 4px;
padding: 20px;
}
.action-wrap { margin-bottom: 24px; }
.btn { height: 32px; padding: 0 20px; border-radius: 4px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.btn-primary { background-color: #1890ff; color: #fff; }
.action-wrap {
margin-bottom: 20px;
}
.table-wrap { border: 1px solid #f0f0f0; border-radius: 4px; }
.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; }
.tr { display: flex; flex-direction: row; border-bottom: 1px solid #f0f0f0; min-height: 60px; align-items: center; }
.td { padding: 10px; display: flex; align-items: center; justify-content: center; }
.td-txt { font-size: 13px; color: #606266; }
.td-txt-small { font-size: 12px; color: #999; }
.btn {
height: 32px;
line-height: 30px;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: none;
}
.avatar { width: 40px; height: 40px; border-radius: 4px; }
.avatar-placeholder { width: 40px; height: 40px; border-radius: 4px; background-color: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.btn-primary {
background-color: #1890ff;
color: #fff;
}
.action-btn { color: #1890ff; font-size: 13px; cursor: pointer; }
.danger { color: #ff4d4f; }
.divider { width: 1px; height: 12px; background-color: #e8e8e8; margin: 0 8px; }
.table-wrap {
width: 100%;
border: 1px solid #f0f0f0;
}
.no-data, .loading-box { padding: 60px 0; text-align: center; width: 100%; }
.no-data-text { font-size: 14px; color: #ccc; }
.table-header {
display: flex;
flex-direction: row;
background-color: #f8f8f9;
}
.pagination-footer { margin-top: 24px; display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 12px; }
.total-txt { font-size: 13px; color: #999; }
.page-btns { display: flex; flex-direction: row; gap: 8px; }
.p-btn { width: 30px; height: 30px; border: 1px solid #dcdee2; display: flex; align-items: center; justify-content: center; border-radius: 4px; cursor: pointer; font-size: 13px; }
.p-btn.active { background-color: #1890ff; color: #fff; border-color: #1890ff; }
.p-btn.disabled { opacity: 0.5; cursor: not-allowed; }
.th {
padding: 12px 10px;
font-size: 14px;
font-weight: bold;
color: #515a6e;
border-bottom: 1px solid #f0f0f0;
text-align: center;
}
/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-card { width: 450px; background-color: #fff; border-radius: 8px; overflow: hidden; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; flex-direction: row; justify-content: space-between; align-items: center; }
.modal-title { font-size: 16px; font-weight: bold; color: #333; }
.close-btn { font-size: 24px; color: #999; cursor: pointer; }
.modal-body { padding: 24px; }
.form-item { margin-bottom: 20px; display: flex; flex-direction: row; align-items: center; }
.f-label { width: 80px; font-size: 14px; color: #666; text-align: right; margin-right: 15px; }
.f-input { flex: 1; border: 1px solid #dcdfe6; height: 36px; padding: 0 12px; border-radius: 4px; font-size: 14px; }
.tr {
display: flex;
flex-direction: row;
border-bottom: 1px solid #f0f0f0;
}
.upload-placeholder { width: 64px; height: 64px; border: 1px dashed #dcdfe6; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #ccc; cursor: pointer; }
.avatar-preview { width: 100%; height: 100%; border-radius: 4px; }
.td {
padding: 12px 10px;
font-size: 14px;
color: #515a6e;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.avatar {
width: 40px;
height: 40px;
border-radius: 4px;
}
.action-btn {
color: #1890ff;
font-size: 13px;
margin-right: 10px;
cursor: pointer;
}
.action-btn-del {
color: #ed4014;
font-size: 13px;
cursor: pointer;
}
.modal-footer { padding: 16px 24px; border-top: 1px solid #f0f0f0; display: flex; flex-direction: row; justify-content: flex-end; gap: 12px; }
</style>

View File

@@ -5,16 +5,9 @@
<view class="search-wrap">
<view class="search-item">
<text class="label">提货点搜索:</text>
<input class="input" placeholder="请输入提货点名称,电话" v-model="searchKey" />
<input class="input" placeholder="请输入提货点名称,电话" v-model="searchKey" @confirm="handleQuery" />
</view>
<button class="btn btn-primary" @click="onSearch">查询</button>
</view>
<!-- 状态 Tabs -->
<view class="tabs-wrap">
<view class="tab-item active"><text class="tab-text">显示中的提货点(2)</text></view>
<view class="tab-item"><text class="tab-text">隐藏中的提货点(0)</text></view>
<view class="tab-item"><text class="tab-text">回收站中的提货点(9)</text></view>
<button class="btn btn-primary" @click="handleQuery">查询</button>
</view>
<view class="action-wrap">
@@ -22,209 +15,272 @@
</view>
<!-- 表格区域 -->
<view class="table-wrap">
<view class="table-wrap border-shadow">
<view class="table-header">
<view class="th" style="flex: 1;">ID</view>
<view class="th" style="flex: 1;">序号</view>
<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;">营业时间</view>
<view class="th" style="flex: 1.5;">是否显示</view>
<view class="th" style="flex: 2;">操作</view>
</view>
<view class="table-body">
<view v-for="item in stationList" :key="item.id" class="tr">
<view class="td" style="flex: 1;">{{ item.id }}</view>
<view v-if="loading" class="loading-box">
<text>加载中...</text>
</view>
<view v-else-if="stationList.length === 0" class="no-data">
<text class="no-data-text">暂无提货点数据</text>
</view>
<view v-else v-for="(item, index) in stationList" :key="item.id" class="tr">
<view class="td" style="flex: 1;"><text class="td-txt">{{ (page - 1) * pageSize + index + 1 }}</text></view>
<view class="td" style="flex: 2;">
<image class="station-img" :src="item.image" mode="aspectFill" />
<image v-if="item.image" class="station-img" :src="item.image" mode="aspectFill" />
<view v-else class="img-placeholder"><text>🖼️</text></view>
</view>
<view class="td" style="flex: 2;">{{ item.name }}</view>
<view class="td" style="flex: 2;">{{ item.phone }}</view>
<view class="td" style="flex: 3;">{{ item.address }}</view>
<view class="td" style="flex: 3;">{{ item.hours }}</view>
<view class="td" style="flex: 2;"><text class="td-txt">{{ item.name }}</text></view>
<view class="td" style="flex: 2;"><text class="td-txt">{{ item.phone }}</text></view>
<view class="td" style="flex: 3;"><text class="td-txt ellipsis-2">{{ item.address }}</text></view>
<view class="td" style="flex: 1.5;">
<switch :checked="item.isshow" color="#1890ff" />
<switch :checked="item.status === 1" color="#1890ff" scale="0.7" @change="onToggleStatus(item)" />
</view>
<view class="td" style="flex: 2;">
<text class="action-btn" @click="onEdit(item)">编辑</text>
<text class="action-btn-del" @click="onDel(item)">删除</text>
<view class="divider"></view>
<text class="action-btn danger" @click="onDelete(item)">删除</text>
</view>
</view>
</view>
</view>
<!-- 分页栏 -->
<view class="pagination-footer">
<text class="total-txt">共 {{ total }} 条</text>
<view class="page-btns">
<text :class="['p-btn', page <= 1 ? 'disabled' : '']" @click="prevPage"> < </text>
<text class="p-btn active">{{ page }}</text>
<text :class="['p-btn', stationList.length < pageSize ? 'disabled' : '']" @click="nextPage"> > </text>
</view>
</view>
</view>
<!-- 添加/编辑 弹窗 -->
<view v-if="showModal" class="modal-overlay" @click="closeModal">
<view class="modal-card" @click.stop>
<view class="modal-header">
<text class="modal-title">{{ isEdit ? '编辑提货点' : '添加提货点' }}</text>
<text class="close-btn" @click="closeModal">×</text>
</view>
<view class="modal-body">
<scroll-view scroll-y="true" style="max-height: 500px;">
<view class="form-item">
<text class="f-label">提货点名称:</text>
<input class="f-input" v-model="form.name" placeholder="请输入名称" />
</view>
<view class="form-item">
<text class="f-label">联系电话:</text>
<input class="f-input" v-model="form.phone" type="number" placeholder="请输入电话" />
</view>
<view class="form-item">
<text class="f-label">详细地址:</text>
<input class="f-input" v-model="form.address" placeholder="请输入详细地址" />
</view>
<view class="form-item">
<text class="f-label">展示图片:</text>
<view class="upload-placeholder" @click="handleUpload">
<image v-if="form.image" :src="form.image" mode="aspectFill" class="img-preview" />
<text v-else>+</text>
</view>
</view>
</scroll-view>
</view>
<view class="modal-footer">
<button class="btn" @click="closeModal">取消</button>
<button class="btn btn-primary" @click="handleSave">保存</button>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { ref, reactive } from 'vue'
import { ref, reactive, onMounted } from 'vue'
import { fetchDeliveryStationPage, saveDeliveryStation, deleteDeliveryStation, type DeliveryStation } from '@/services/admin/deliveryService.uts'
const stationList = ref<DeliveryStation[]>([])
const loading = ref(false)
const total = ref(0)
const page = ref(1)
const pageSize = 15
const searchKey = ref('')
type StationItem = {
id: number
image: string
name: string
phone: string
address: string
hours: string
isshow: boolean
// Modal state
const showModal = ref(false)
const isEdit = ref(false)
const form = reactive({
id: '' as string | null,
name: '',
phone: '',
address: '',
image: '',
status: 1,
sort_order: 0
})
onMounted(() => {
loadData()
})
async function loadData() {
loading.value = true
try {
const res = await fetchDeliveryStationPage(page.value, pageSize, searchKey.value || null)
stationList.value = res.items
total.value = res.total
} catch (e) {
uni.showToast({ title: '加载失败', icon: 'none' })
} finally {
loading.value = false
}
}
const stationList = reactive<StationItem[]>([
{ id: 46, image: '/static/logo.png', name: '提货点222', phone: '13769102384', address: '能看见你的困难', hours: '00:00:00 - 23:00:00', isshow: true },
{ id: 44, image: '/static/logo.png', name: '美东科技', phone: '15912341234', address: '襄阳火车站', hours: '08:00:00 - 22:00:00', isshow: true }
])
function onSearch() {
console.log('Search:', searchKey.value)
function handleQuery() {
page.value = 1
loadData()
}
function onAdd() {
console.log('Add station')
isEdit.value = false
form.id = null
form.name = ''
form.phone = ''
form.address = ''
form.image = ''
form.status = 1
form.sort_order = 0
showModal.value = true
}
function onEdit(item: StationItem) {
console.log('Edit:', item.name)
function onEdit(item : DeliveryStation) {
isEdit.value = true
form.id = item.id
form.name = item.name
form.phone = item.phone
form.address = item.address
form.image = item.image || ''
form.status = item.status
form.sort_order = item.sort_order
showModal.value = true
}
function onDel(item: StationItem) {
console.log('Delete:', item.id)
function closeModal() {
showModal.value = false
}
async function handleSave() {
if (!form.name || !form.phone || !form.address) {
uni.showToast({ title: '请完善必要信息', icon: 'none' })
return
}
loading.value = true
try {
const resId = await saveDeliveryStation(form)
if (resId != null) {
uni.showToast({ title: '保存成功' })
closeModal()
loadData()
}
} finally {
loading.value = false
}
}
async function onDelete(item : DeliveryStation) {
uni.showModal({
title: '提示',
content: `确定要删除提货点 "${item.name}" 吗?`,
success: async (res) => {
if (res.confirm) {
const ok = await deleteDeliveryStation(item.id)
if (ok) {
uni.showToast({ title: '删除成功' })
loadData()
}
}
}
})
}
async function onToggleStatus(item : DeliveryStation) {
const nextStatus = item.status === 1 ? 0 : 1
const ok = await saveDeliveryStation({ ...item, status: nextStatus })
if (ok != null) {
item.status = nextStatus
uni.showToast({ title: '状态已更新' })
}
}
function prevPage() { if (page.value > 1) { page.value--; loadData(); } }
function nextPage() { if (stationList.value.length >= pageSize) { page.value++; loadData(); } }
function handleUpload() {
uni.showToast({ title: '上传功能开发中', icon: 'none' })
}
</script>
<style scoped>
.admin-page-container {
padding: 15px;
background-color: #f5f7f9;
min-height: 100vh;
}
<style scoped lang="scss">
.admin-page-container { padding: 24px; background-color: #f5f7f9; min-height: 100vh; }
.page-card { background-color: #fff; border-radius: 4px; padding: 24px; }
.page-card {
background-color: #fff;
border-radius: 4px;
padding: 20px;
}
.search-wrap { display: flex; flex-direction: row; align-items: center; padding-bottom: 24px; border-bottom: 1px solid #f0f0f0; margin-bottom: 24px; }
.search-item { display: flex; flex-direction: row; align-items: center; margin-right: 24px; }
.label { font-size: 14px; color: #606266; margin-right: 8px; }
.input { width: 250px; height: 32px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 12px; font-size: 14px; }
.search-wrap {
display: flex;
flex-direction: row;
align-items: center;
padding-bottom: 20px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 20px;
}
.btn { height: 32px; padding: 0 20px; border-radius: 4px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.btn-primary { background-color: #1890ff; color: #fff; }
.label {
font-size: 14px;
color: #606266;
}
.action-wrap { margin-bottom: 20px; }
.input {
width: 250px;
height: 32px;
padding: 0 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
font-size: 14px;
color: #606266;
margin-right: 15px;
}
.table-wrap { border: 1px solid #f0f0f0; border-radius: 4px; }
.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; }
.tr { display: flex; flex-direction: row; border-bottom: 1px solid #f0f0f0; min-height: 60px; align-items: center; }
.td { padding: 10px; display: flex; align-items: center; justify-content: center; }
.td-txt { font-size: 13px; color: #606266; text-align: center; }
.ellipsis-2 { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tabs-wrap {
display: flex;
flex-direction: row;
margin-bottom: 20px;
border-bottom: 1px solid #f0f2f5;
}
.station-img { width: 44px; height: 44px; border-radius: 4px; background-color: #f5f5f5; }
.img-placeholder { width: 44px; height: 44px; border-radius: 4px; background-color: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.tab-item {
padding: 10px 15px;
cursor: pointer;
}
.action-btn { color: #1890ff; font-size: 13px; cursor: pointer; }
.danger { color: #ff4d4f; }
.divider { width: 1px; height: 12px; background-color: #e8e8e8; margin: 0 8px; }
.tab-item.active {
border-bottom: 2px solid #1890ff;
}
.no-data, .loading-box { padding: 60px 0; text-align: center; width: 100%; }
.no-data-text { font-size: 14px; color: #ccc; }
.tab-item.active .tab-text {
color: #1890ff;
}
.pagination-footer { margin-top: 24px; display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 12px; }
.total-txt { font-size: 13px; color: #999; }
.page-btns { display: flex; flex-direction: row; gap: 8px; }
.p-btn { width: 30px; height: 30px; border: 1px solid #dcdee2; display: flex; align-items: center; justify-content: center; border-radius: 4px; cursor: pointer; font-size: 13px; }
.p-btn.active { background-color: #1890ff; color: #fff; border-color: #1890ff; }
.p-btn.disabled { opacity: 0.5; cursor: not-allowed; }
.tab-text {
font-size: 14px;
color: #515a6e;
}
/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-card { width: 500px; background-color: #fff; border-radius: 8px; overflow: hidden; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; flex-direction: row; justify-content: space-between; align-items: center; }
.modal-title { font-size: 16px; font-weight: bold; color: #333; }
.close-btn { font-size: 24px; color: #999; cursor: pointer; }
.modal-body { padding: 24px; }
.form-item { margin-bottom: 20px; display: flex; flex-direction: row; align-items: center; }
.f-label { width: 90px; font-size: 14px; color: #666; text-align: right; margin-right: 15px; }
.f-input { flex: 1; border: 1px solid #dcdfe6; height: 36px; padding: 0 12px; border-radius: 4px; font-size: 14px; }
.action-wrap {
margin-bottom: 20px;
}
.upload-placeholder { width: 64px; height: 64px; border: 1px dashed #dcdfe6; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #ccc; cursor: pointer; }
.img-preview { width: 100%; height: 100%; border-radius: 4px; }
.btn {
height: 32px;
line-height: 30px;
padding: 0 15px;
font-size: 14px;
border-radius: 4px;
border: none;
}
.btn-primary {
background-color: #1890ff;
color: #fff;
}
.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;
}
.tr {
display: flex;
flex-direction: row;
border-bottom: 1px solid #f0f0f0;
}
.td {
padding: 12px 10px;
font-size: 14px;
color: #515a6e;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.station-img {
width: 40px;
height: 40px;
border-radius: 4px;
}
.action-btn {
color: #1890ff;
font-size: 13px;
margin-right: 10px;
}
.action-btn-del {
color: #ed4014;
font-size: 13px;
}
.modal-footer { padding: 16px 24px; border-top: 1px solid #f0f0f0; display: flex; flex-direction: row; justify-content: flex-end; gap: 12px; }
</style>