feat: 添加用户ID和订单ID链接跳转功能
- 在团购活动页面中为用户ID添加点击跳转到用户详情的功能 - 在团购管理页面中为用户ID添加点击跳转到用户详情的功能 - 在审核相关页面中为容器ID添加点击跳转到容器详情的功能 - 在营销相关页面中为用户ID和订单ID添加点击跳转功能 - 在订单列表页面中为用户ID和商品ID添加点击跳转功能 - 在商品列表页面中为用户和商品添加点击跳转功能 - 在工单列表页面中为用户名添加点击跳转到用户详情的功能 - 在用户虚拟机列表中为商品和用户添加点击跳转功能 - 在用户余额页面中为支付订单ID添加点击跳转到订单详情的功能 - 统一使用el-link组件实现可点击的链接样式 - 添加useRouter依赖并创建router实例用于页面跳转
This commit is contained in:
@@ -43,7 +43,12 @@
|
||||
stripe
|
||||
>
|
||||
<el-table-column prop="id" label="记录ID" width="80" fixed="left" />
|
||||
<el-table-column prop="user_id" label="用户ID" width="100" />
|
||||
<el-table-column label="用户ID" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-link v-if="row.user_id" type="primary" :underline="false" @click="router.push({ path: '/user/detail', query: { user_id: row.user_id } })">{{ row.user_id }}</el-link>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="username" label="用户名" width="150" />
|
||||
<el-table-column prop="email" label="邮箱" min-width="200" />
|
||||
<el-table-column prop="discount_id" label="代金券ID" width="120" v-if="!codeId" />
|
||||
@@ -58,7 +63,12 @@
|
||||
<span>¥{{ row.order_amount ? (row.order_amount / 100).toFixed(2) : '0.00' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="order_id" label="订单ID" width="150" />
|
||||
<el-table-column label="订单ID" width="150">
|
||||
<template #default="{ row }">
|
||||
<el-link v-if="row.order_id" type="primary" :underline="false" @click="router.push({ path: '/order/list', query: { key: row.order_id } })">{{ row.order_id }}</el-link>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="getStatusType(row.status)">
|
||||
@@ -174,6 +184,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, computed, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Search, Refresh, Download } from '@element-plus/icons-vue'
|
||||
import { getUserVoucherHistory, getDiscountCodeList } from '@/api/admin/discount'
|
||||
@@ -187,6 +198,8 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// 查询参数
|
||||
const queryParams = reactive({
|
||||
user_id: undefined,
|
||||
|
||||
Reference in New Issue
Block a user