|
|
@@ -1,59 +1,167 @@
|
|
|
<template>
|
|
|
- <div class="page-container">
|
|
|
- <div class="page-header">
|
|
|
- <h2 class="page-title">订单管理</h2>
|
|
|
- <div class="filter-bar">
|
|
|
- <el-select v-model="filters.status" placeholder="状态" clearable style="width:140px" @change="fetchList">
|
|
|
- <el-option label="待支付" value="unpaid" />
|
|
|
- <el-option label="已支付" value="paid" />
|
|
|
- <el-option label="已退款" value="refunded" />
|
|
|
- <el-option label="已关闭" value="closed" />
|
|
|
- <el-option label="支付失败" value="failed" />
|
|
|
- </el-select>
|
|
|
- <el-button type="primary" icon="el-icon-refresh" @click="fetchList">刷新</el-button>
|
|
|
+ <div class="orders-page">
|
|
|
+ <!-- 内容工具栏:页头标题由外壳提供,此处仅放操作按钮 -->
|
|
|
+ <div class="toolbar">
|
|
|
+ <div class="toolbar-left">
|
|
|
+ <el-button icon="el-icon-refresh" @click="fetchList">刷新</el-button>
|
|
|
+ <el-button icon="el-icon-download" @click="$message.info('导出工单')">导出工单</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="toolbar-right">
|
|
|
+ <span class="toolbar-count">共 {{ list.length }} 条订单</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 加载态 -->
|
|
|
+ <div v-if="state === 'loading'" class="loading-wrap">
|
|
|
+ <div class="card stats-row">
|
|
|
+ <div v-for="n in 4" :key="'sk' + n" class="stat-cell">
|
|
|
+ <div class="sk" style="width:40px;height:26px"></div>
|
|
|
+ <div class="sk" style="width:56px;height:12px;margin-top:8px"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="cols">
|
|
|
+ <div v-for="c in 3" :key="'col-sk' + c" class="col">
|
|
|
+ <div class="col-h"><span class="col-title">统计中</span></div>
|
|
|
+ <div class="sk" style="height:132px;margin-bottom:10px"></div>
|
|
|
+ <div class="sk" style="height:132px;margin-bottom:10px"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 错误态 -->
|
|
|
+ <div v-else-if="state === 'error'" class="error-wrap">
|
|
|
+ <div class="err-banner">
|
|
|
+ <span>订单列表加载失败,请重新加载</span>
|
|
|
+ <el-button size="mini" @click="fetchList">重试</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="card stats-row">
|
|
|
+ <div v-for="s in statDefs" :key="'err-' + s.key" class="stat-cell">
|
|
|
+ <div class="stat-num muted">—</div>
|
|
|
+ <div class="stat-label">{{ s.label }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 正常 / 空态 -->
|
|
|
+ <div v-else>
|
|
|
+ <!-- 统计行 -->
|
|
|
+ <div class="card stats-row">
|
|
|
+ <div v-for="s in statDefs" :key="s.key" class="stat-cell">
|
|
|
+ <div class="stat-num">{{ stats[s.key] }}</div>
|
|
|
+ <div class="stat-label">{{ s.label }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 视图切换 chip -->
|
|
|
+ <div class="view-toggle">
|
|
|
+ <button class="chip" :class="{ on: view === 'board' }" @click="view = 'board'">看板视图</button>
|
|
|
+ <button class="chip" :class="{ on: view === 'list' }" @click="view = 'list'">列表视图</button>
|
|
|
+ <span class="view-hint">按订单状态分组</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 空态 -->
|
|
|
+ <div v-if="state === 'empty'" class="card empty-state">
|
|
|
+ <div class="empty-ico"></div>
|
|
|
+ <h4>暂无订单</h4>
|
|
|
+ <p>当前筛选条件下没有订单记录</p>
|
|
|
+ <el-button type="primary" size="small" @click="fetchList">重新加载</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 看板视图 -->
|
|
|
+ <div v-else-if="view === 'board'" class="cols">
|
|
|
+ <div v-for="col in boardCols" :key="col.status" class="col">
|
|
|
+ <div class="col-h">
|
|
|
+ <span class="col-title">{{ col.label }}</span>
|
|
|
+ <span class="col-count">{{ colItems(col.status).length }} 单</span>
|
|
|
+ </div>
|
|
|
+ <div v-if="colItems(col.status).length === 0" class="col-empty">暂无工单</div>
|
|
|
+ <div
|
|
|
+ v-for="row in colItems(col.status)"
|
|
|
+ :key="row.id"
|
|
|
+ class="task-card"
|
|
|
+ :class="{ sel: selectedIds.indexOf(row.id) !== -1 }"
|
|
|
+ @click="toggleSelect(row)"
|
|
|
+ >
|
|
|
+ <div class="task-no">{{ row.orderNo }}</div>
|
|
|
+ <div class="task-name">{{ row.userName }} · {{ row.className }}</div>
|
|
|
+ <div class="task-meta">
|
|
|
+ <div>实付:¥{{ fenToYuan(row.amount) }}</div>
|
|
|
+ <div>创建:{{ fmtTime(row.createdAt) }}</div>
|
|
|
+ <div v-if="row.payTime">支付:{{ fmtTime(row.payTime) }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="task-foot">
|
|
|
+ <el-tag :type="statusType(row.status)" size="mini">{{ statusLabel(row.status) }}</el-tag>
|
|
|
+ <el-button
|
|
|
+ v-if="row.status === 'paid'"
|
|
|
+ type="danger"
|
|
|
+ size="mini"
|
|
|
+ @click.stop="openRefund(row)"
|
|
|
+ >退款</el-button>
|
|
|
+ <span class="link" @click.stop="openDrawer(row)">处理记录</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 列表视图 -->
|
|
|
+ <div v-else class="card table-card">
|
|
|
+ <el-table
|
|
|
+ :data="list"
|
|
|
+ style="width:100%"
|
|
|
+ @selection-change="onSelectionChange"
|
|
|
+ @row-click="openDrawer"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="48" @click.stop />
|
|
|
+ <el-table-column prop="orderNo" label="订单号" min-width="180" />
|
|
|
+ <el-table-column prop="className" label="班次" min-width="130" />
|
|
|
+ <el-table-column prop="userName" label="报名人" width="100" />
|
|
|
+ <el-table-column label="实付金额" width="110">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>¥{{ fenToYuan(scope.row.amount) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="原价" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.originalAmount > 0">¥{{ fenToYuan(scope.row.originalAmount) }}</span>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="状态" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag :type="statusType(scope.row.status)" size="small">{{ statusLabel(scope.row.status) }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="payTime" label="支付时间" width="170">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ fmtTime(scope.row.payTime) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createdAt" label="创建时间" width="170">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ fmtTime(scope.row.createdAt) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="160" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="link" @click.stop="openDrawer(scope.row)">详情</span>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.status === 'paid'"
|
|
|
+ type="danger"
|
|
|
+ size="mini"
|
|
|
+ style="margin-left:8px"
|
|
|
+ @click.stop="openRefund(scope.row)"
|
|
|
+ >退款</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <el-table :data="list" v-loading="loading" border stripe style="width:100%">
|
|
|
- <el-table-column prop="id" label="ID" width="70" />
|
|
|
- <el-table-column prop="orderNo" label="订单号" min-width="180" />
|
|
|
- <el-table-column prop="className" label="班次" min-width="130" />
|
|
|
- <el-table-column prop="userName" label="报名人" width="100" />
|
|
|
- <el-table-column label="实付金额" width="110">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>¥{{ fenToYuan(scope.row.amount) }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="原价" width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.originalAmount > 0">¥{{ fenToYuan(scope.row.originalAmount) }}</span>
|
|
|
- <span v-else>-</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="状态" width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag :type="statusType(scope.row.status)" size="small">{{ statusLabel(scope.row.status) }}</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="payTime" label="支付时间" width="170" :formatter="formatTime" />
|
|
|
- <el-table-column prop="createdAt" label="创建时间" width="170" :formatter="formatTime" />
|
|
|
- <el-table-column label="操作" width="130" fixed="right">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button v-if="scope.row.status === 'paid'" type="danger" size="mini" @click="openRefund(scope.row)">退款</el-button>
|
|
|
- <span v-else>-</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
-
|
|
|
- <!-- 退款对话框(test-mode 直接置 refunded) -->
|
|
|
+ <!-- 退款对话框 -->
|
|
|
<el-dialog title="订单退款" :visible.sync="refundVisible" width="420px" :close-on-click-modal="false">
|
|
|
<el-form label-width="90px">
|
|
|
- <el-form-item label="订单号">
|
|
|
- <span>{{ refundRow.orderNo }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="实付金额">
|
|
|
- <span>¥{{ fenToYuan(refundRow.amount) }}</span>
|
|
|
- </el-form-item>
|
|
|
+ <el-form-item label="订单号"><span>{{ refundRow.orderNo }}</span></el-form-item>
|
|
|
+ <el-form-item label="实付金额"><span>¥{{ fenToYuan(refundRow.amount) }}</span></el-form-item>
|
|
|
<el-form-item label="退款金额">
|
|
|
<el-input-number v-model="refundAmount" :min="0.01" :max="refundMax" :precision="2" :step="1" />
|
|
|
</el-form-item>
|
|
|
@@ -63,6 +171,65 @@
|
|
|
<el-button type="danger" :loading="refunding" @click="confirmRefund">确认退款</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 处理记录抽屉 -->
|
|
|
+ <el-drawer
|
|
|
+ :visible.sync="drawerVisible"
|
|
|
+ size="440px"
|
|
|
+ :with-header="false"
|
|
|
+ >
|
|
|
+ <div class="drawer-inner" v-if="drawerRow">
|
|
|
+ <div class="dw-header">
|
|
|
+ <span class="dw-title">处理记录 · {{ drawerRow.orderNo }}</span>
|
|
|
+ <el-button type="text" icon="el-icon-close" @click="drawerVisible = false" />
|
|
|
+ </div>
|
|
|
+ <div class="dw-body">
|
|
|
+ <div class="dw-summary">
|
|
|
+ <div class="dw-name">{{ drawerRow.userName }} · {{ drawerRow.className }}</div>
|
|
|
+ <div class="dw-meta">
|
|
|
+ <el-tag :type="statusType(drawerRow.status)" size="mini">{{ statusLabel(drawerRow.status) }}</el-tag>
|
|
|
+ <span>实付 ¥{{ fenToYuan(drawerRow.amount) }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="dw-timeline">
|
|
|
+ <div class="tl-item">
|
|
|
+ <b>订单创建</b>
|
|
|
+ <p>{{ fmtTime(drawerRow.createdAt) }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="tl-item" v-if="drawerRow.payTime">
|
|
|
+ <b>支付成功</b>
|
|
|
+ <p>{{ fmtTime(drawerRow.payTime) }} · ¥{{ fenToYuan(drawerRow.amount) }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="tl-item" v-if="drawerRow.status === 'refunded'">
|
|
|
+ <b>已退款</b>
|
|
|
+ <p>退款已处理</p>
|
|
|
+ </div>
|
|
|
+ <div class="tl-item" v-if="drawerRow.status === 'closed'">
|
|
|
+ <b>订单关闭</b>
|
|
|
+ <p>订单已关闭</p>
|
|
|
+ </div>
|
|
|
+ <div class="tl-item" v-if="drawerRow.status === 'unpaid'">
|
|
|
+ <b>待支付</b>
|
|
|
+ <p>等待学员完成支付</p>
|
|
|
+ </div>
|
|
|
+ <div class="tl-item" v-if="drawerRow.status === 'failed'">
|
|
|
+ <b>支付失败</b>
|
|
|
+ <p>支付未成功,订单状态异常</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <p class="dw-hint">退款操作请在确认影响后执行;批量操作请核对对象与数量。</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
+
|
|
|
+ <!-- sticky footer:已选数常驻 -->
|
|
|
+ <div class="footbar" v-if="selected.length > 0">
|
|
|
+ <span>已选中 <b>{{ selected.length }}</b> 笔订单 · 总额 ¥{{ selectedTotal }}</span>
|
|
|
+ <div>
|
|
|
+ <el-button size="mini" @click="clearSelection">取消选择</el-button>
|
|
|
+ <el-button size="mini" @click="$message.info('批量导出')">批量导出</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -75,14 +242,58 @@ export default {
|
|
|
return {
|
|
|
list: [],
|
|
|
loading: false,
|
|
|
- filters: {
|
|
|
- status: ''
|
|
|
- },
|
|
|
+ fetchFailed: false,
|
|
|
+ view: 'board',
|
|
|
+ filters: { status: '' },
|
|
|
refundVisible: false,
|
|
|
refundRow: {},
|
|
|
refundAmount: 0,
|
|
|
refundMax: 0,
|
|
|
- refunding: false
|
|
|
+ refunding: false,
|
|
|
+ drawerVisible: false,
|
|
|
+ drawerRow: null,
|
|
|
+ selected: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ state: function () {
|
|
|
+ if (this.fetchFailed) return 'error'
|
|
|
+ if (this.loading) return 'loading'
|
|
|
+ return this.list.length === 0 ? 'empty' : 'normal'
|
|
|
+ },
|
|
|
+ statDefs: function () {
|
|
|
+ return [
|
|
|
+ { key: 'total', label: '总订单' },
|
|
|
+ { key: 'unpaid', label: '待支付' },
|
|
|
+ { key: 'paid', label: '已支付' },
|
|
|
+ { key: 'refunded', label: '已退款' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ stats: function () {
|
|
|
+ var self = this
|
|
|
+ var s = { total: self.list.length, unpaid: 0, paid: 0, refunded: 0 }
|
|
|
+ self.list.forEach(function (r) {
|
|
|
+ if (r.status === 'unpaid' || r.status === 'failed') s.unpaid++
|
|
|
+ else if (r.status === 'paid') s.paid++
|
|
|
+ else if (r.status === 'refunded') s.refunded++
|
|
|
+ })
|
|
|
+ return s
|
|
|
+ },
|
|
|
+ boardCols: function () {
|
|
|
+ return [
|
|
|
+ { status: 'unpaid', label: '待支付' },
|
|
|
+ { status: 'paid', label: '已支付' },
|
|
|
+ { status: 'refunded', label: '已退款' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ selectedIds: function () {
|
|
|
+ return this.selected.map(function (r) { return r.id })
|
|
|
+ },
|
|
|
+ selectedTotal: function () {
|
|
|
+ var sum = this.selected.reduce(function (acc, r) {
|
|
|
+ return acc + Number(r.amount || 0)
|
|
|
+ }, 0)
|
|
|
+ return (sum / 100).toFixed(2)
|
|
|
}
|
|
|
},
|
|
|
mounted: function () {
|
|
|
@@ -94,9 +305,9 @@ export default {
|
|
|
if (isNaN(n)) return '0.00'
|
|
|
return (n / 100).toFixed(2)
|
|
|
},
|
|
|
- formatTime: function (row, col, val) {
|
|
|
+ fmtTime: function (val) {
|
|
|
if (!val) return '-'
|
|
|
- return String(val).replace('T', ' ').substring(0, 19)
|
|
|
+ return String(val).replace('T', ' ').substring(0, 16)
|
|
|
},
|
|
|
statusType: function (status) {
|
|
|
var map = { unpaid: 'warning', paid: 'success', refunded: 'info', closed: 'info', failed: 'danger' }
|
|
|
@@ -106,17 +317,28 @@ export default {
|
|
|
var map = { unpaid: '待支付', paid: '已支付', refunded: '已退款', closed: '已关闭', failed: '支付失败' }
|
|
|
return map[status] || status || '-'
|
|
|
},
|
|
|
+ colItems: function (status) {
|
|
|
+ if (status === 'unpaid') {
|
|
|
+ return this.list.filter(function (r) { return r.status === 'unpaid' || r.status === 'failed' })
|
|
|
+ }
|
|
|
+ if (status === 'paid') {
|
|
|
+ return this.list.filter(function (r) { return r.status === 'paid' })
|
|
|
+ }
|
|
|
+ if (status === 'refunded') {
|
|
|
+ return this.list.filter(function (r) { return r.status === 'refunded' || r.status === 'closed' })
|
|
|
+ }
|
|
|
+ return []
|
|
|
+ },
|
|
|
fetchList: function () {
|
|
|
var self = this
|
|
|
self.loading = true
|
|
|
+ self.fetchFailed = false
|
|
|
var payload = {}
|
|
|
- if (self.filters.status) {
|
|
|
- payload.status = self.filters.status
|
|
|
- }
|
|
|
+ if (self.filters.status) payload.status = self.filters.status
|
|
|
orderList(payload).then(function (res) {
|
|
|
self.list = res.data || []
|
|
|
}).catch(function () {
|
|
|
- self.$message.error('获取订单列表失败')
|
|
|
+ self.fetchFailed = true
|
|
|
}).finally(function () {
|
|
|
self.loading = false
|
|
|
})
|
|
|
@@ -134,11 +356,8 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
self.refunding = true
|
|
|
- var data = {
|
|
|
- orderId: self.refundRow.id,
|
|
|
- amount: Math.round(self.refundAmount * 100)
|
|
|
- }
|
|
|
- orderRefund(data).then(function (res) {
|
|
|
+ var data = { orderId: self.refundRow.id, amount: Math.round(self.refundAmount * 100) }
|
|
|
+ orderRefund(data).then(function () {
|
|
|
self.$message.success('退款成功')
|
|
|
self.refundVisible = false
|
|
|
self.fetchList()
|
|
|
@@ -147,31 +366,343 @@ export default {
|
|
|
}).finally(function () {
|
|
|
self.refunding = false
|
|
|
})
|
|
|
+ },
|
|
|
+ openDrawer: function (row) {
|
|
|
+ this.drawerRow = row
|
|
|
+ this.drawerVisible = true
|
|
|
+ },
|
|
|
+ toggleSelect: function (row) {
|
|
|
+ var idx = this.selectedIds.indexOf(row.id)
|
|
|
+ if (idx === -1) {
|
|
|
+ this.selected.push(row)
|
|
|
+ } else {
|
|
|
+ this.selected.splice(idx, 1)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onSelectionChange: function (rows) {
|
|
|
+ this.selected = rows
|
|
|
+ },
|
|
|
+ clearSelection: function () {
|
|
|
+ this.selected = []
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.page-header {
|
|
|
+.orders-page {
|
|
|
+ padding-bottom: 72px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 工具栏 */
|
|
|
+.toolbar {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
+.toolbar-right {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #6B7B8C;
|
|
|
+}
|
|
|
+
|
|
|
+/* 统计行 */
|
|
|
+.stats-row {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(4, 1fr);
|
|
|
+ margin-bottom: 16px;
|
|
|
+ padding: 0;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+.stat-cell {
|
|
|
+ padding: 14px 20px;
|
|
|
+ border-right: 1px solid #DCE7F1;
|
|
|
+}
|
|
|
+.stat-cell:last-child {
|
|
|
+ border-right: none;
|
|
|
+}
|
|
|
+.stat-num {
|
|
|
+ font-size: 26px;
|
|
|
+ font-weight: 700;
|
|
|
+ font-variant-numeric: tabular-nums;
|
|
|
+ color: #1E3A5F;
|
|
|
+}
|
|
|
+.stat-label {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #6B7B8C;
|
|
|
+ margin-top: 2px;
|
|
|
+}
|
|
|
+.stat-num.muted {
|
|
|
+ color: #C3D2DF;
|
|
|
+}
|
|
|
+
|
|
|
+/* 视图切换 */
|
|
|
+.view-toggle {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 12px;
|
|
|
+}
|
|
|
+.chip {
|
|
|
+ border: 1px solid #C3D2DF;
|
|
|
+ background: #FFFFFF;
|
|
|
+ color: #3B5A78;
|
|
|
+ font-size: 13px;
|
|
|
+ padding: 5px 16px;
|
|
|
+ border-radius: 4px;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-right: 8px;
|
|
|
+}
|
|
|
+.chip.on {
|
|
|
+ background: #E8F3FC;
|
|
|
+ border-color: #2E6FA8;
|
|
|
+ color: #2E6FA8;
|
|
|
+ font-weight: 600;
|
|
|
+}
|
|
|
+.view-hint {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #6B7B8C;
|
|
|
+ margin-left: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 看板列 */
|
|
|
+.cols {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(3, 1fr);
|
|
|
+ gap: 16px;
|
|
|
+ align-items: start;
|
|
|
+}
|
|
|
+.col {
|
|
|
+ background: #F0F4F9;
|
|
|
+ border: 1px solid #DCE7F1;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 12px;
|
|
|
+ min-height: 200px;
|
|
|
+}
|
|
|
+.col-h {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding-bottom: 8px;
|
|
|
+ border-bottom: 1px solid #DCE7F1;
|
|
|
+ margin-bottom: 12px;
|
|
|
+}
|
|
|
+.col-title {
|
|
|
+ font-size: 15px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #1E3A5F;
|
|
|
+}
|
|
|
+.col-count {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #6B7B8C;
|
|
|
+}
|
|
|
+.col-empty {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #6B7B8C;
|
|
|
+ padding: 32px 0;
|
|
|
+}
|
|
|
|
|
|
-.page-title {
|
|
|
- margin: 0;
|
|
|
- font-size: 18px;
|
|
|
+/* 任务卡 */
|
|
|
+.task-card {
|
|
|
+ background: #FFFFFF;
|
|
|
+ border: 1px solid #DCE7F1;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 14px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.task-card.sel {
|
|
|
+ border-color: #2E6FA8;
|
|
|
+ background: #E8F3FC;
|
|
|
+}
|
|
|
+.task-no {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #6B7B8C;
|
|
|
+ font-variant-numeric: tabular-nums;
|
|
|
+}
|
|
|
+.task-name {
|
|
|
+ font-size: 14px;
|
|
|
font-weight: 600;
|
|
|
+ color: #1E3A5F;
|
|
|
+ margin: 4px 0;
|
|
|
+}
|
|
|
+.task-meta {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #6B7B8C;
|
|
|
+ line-height: 1.8;
|
|
|
+}
|
|
|
+.task-foot {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 表格卡 */
|
|
|
+.table-card {
|
|
|
+ padding: 0;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
|
|
|
-.filter-bar {
|
|
|
+/* 通用卡片 */
|
|
|
+.card {
|
|
|
+ background: #FFFFFF;
|
|
|
+ border: 1px solid #DCE7F1;
|
|
|
+ border-radius: 8px;
|
|
|
+ box-shadow: 0 2px 10px rgba(30, 58, 95, .06);
|
|
|
+ padding: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 骨架屏 */
|
|
|
+.sk {
|
|
|
+ background: #E8F0F7;
|
|
|
+ border-radius: 4px;
|
|
|
+ animation: pulse 1.2s ease-in-out infinite alternate;
|
|
|
+}
|
|
|
+@keyframes pulse {
|
|
|
+ from { opacity: .55; }
|
|
|
+ to { opacity: 1; }
|
|
|
+}
|
|
|
+
|
|
|
+/* 错误 banner */
|
|
|
+.err-banner {
|
|
|
+ background: #FDE8E8;
|
|
|
+ border: 1px solid #C0392B;
|
|
|
+ color: #C0392B;
|
|
|
+ padding: 10px 12px;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 14px;
|
|
|
display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
align-items: center;
|
|
|
+ margin-bottom: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 空态 */
|
|
|
+.empty-state {
|
|
|
+ text-align: center;
|
|
|
+ padding: 48px 16px;
|
|
|
+ color: #6B7B8C;
|
|
|
+}
|
|
|
+.empty-ico {
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background: #E8F3FC;
|
|
|
+ margin: 0 auto 12px;
|
|
|
+}
|
|
|
+.empty-state h4 {
|
|
|
+ font-size: 15px;
|
|
|
+ color: #1E3A5F;
|
|
|
+ margin-bottom: 6px;
|
|
|
+}
|
|
|
+.empty-state p {
|
|
|
+ font-size: 13px;
|
|
|
+ margin-bottom: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 抽屉 */
|
|
|
+.drawer-inner {
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+.dw-header {
|
|
|
+ height: 56px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 0 18px;
|
|
|
+ border-bottom: 1px solid #DCE7F1;
|
|
|
+}
|
|
|
+.dw-title {
|
|
|
+ font-size: 15px;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #1E3A5F;
|
|
|
+}
|
|
|
+.dw-body {
|
|
|
+ flex: 1;
|
|
|
+ overflow: auto;
|
|
|
+ padding: 18px;
|
|
|
+}
|
|
|
+.dw-summary {
|
|
|
+ margin-bottom: 18px;
|
|
|
+}
|
|
|
+.dw-name {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #1E3A5F;
|
|
|
+ margin-bottom: 6px;
|
|
|
+}
|
|
|
+.dw-meta {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8px;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #3B5A78;
|
|
|
+}
|
|
|
+.dw-timeline {
|
|
|
+ border-left: 2px solid #E8F3FC;
|
|
|
+ margin-left: 6px;
|
|
|
+ padding-left: 16px;
|
|
|
+}
|
|
|
+.tl-item {
|
|
|
+ position: relative;
|
|
|
+ padding-bottom: 16px;
|
|
|
+}
|
|
|
+.tl-item::before {
|
|
|
+ content: "";
|
|
|
+ position: absolute;
|
|
|
+ left: -22px;
|
|
|
+ top: 5px;
|
|
|
+ width: 9px;
|
|
|
+ height: 9px;
|
|
|
+ border-radius: 50%;
|
|
|
+ background: #2E6FA8;
|
|
|
+}
|
|
|
+.tl-item b {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #1E3A5F;
|
|
|
+}
|
|
|
+.tl-item p {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #6B7B8C;
|
|
|
+}
|
|
|
+.dw-hint {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #6B7B8C;
|
|
|
+ margin-top: 12px;
|
|
|
+ padding-top: 12px;
|
|
|
+ border-top: 1px solid #DCE7F1;
|
|
|
+}
|
|
|
+
|
|
|
+/* sticky footer */
|
|
|
+.footbar {
|
|
|
+ position: fixed;
|
|
|
+ left: 220px;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ height: 56px;
|
|
|
+ background: #FFFFFF;
|
|
|
+ border-top: 1px solid #DCE7F1;
|
|
|
+ box-shadow: 0 -2px 10px rgba(30, 58, 95, .06);
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 0 24px;
|
|
|
+ z-index: 5;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #3B5A78;
|
|
|
+}
|
|
|
+.footbar b {
|
|
|
+ color: #2E6FA8;
|
|
|
+ font-variant-numeric: tabular-nums;
|
|
|
}
|
|
|
|
|
|
-.filter-bar .el-select {
|
|
|
- margin-right: 12px;
|
|
|
+/* 链接 */
|
|
|
+.link {
|
|
|
+ color: #2E6FA8;
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 13px;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|