feat: 添加用户ID和订单ID链接跳转功能
- 在团购活动页面中为用户ID添加点击跳转到用户详情的功能 - 在团购管理页面中为用户ID添加点击跳转到用户详情的功能 - 在审核相关页面中为容器ID添加点击跳转到容器详情的功能 - 在营销相关页面中为用户ID和订单ID添加点击跳转功能 - 在订单列表页面中为用户ID和商品ID添加点击跳转功能 - 在商品列表页面中为用户和商品添加点击跳转功能 - 在工单列表页面中为用户名添加点击跳转到用户详情的功能 - 在用户虚拟机列表中为商品和用户添加点击跳转功能 - 在用户余额页面中为支付订单ID添加点击跳转到订单详情的功能 - 统一使用el-link组件实现可点击的链接样式 - 添加useRouter依赖并创建router实例用于页面跳转
This commit is contained in:
@@ -119,7 +119,12 @@
|
||||
</el-avatar>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userId" label="用户ID" width="100" />
|
||||
<el-table-column label="用户ID" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-link v-if="row.userId" type="primary" :underline="false" @click="router.push({ path: '/user/detail', query: { user_id: row.userId } })">{{ row.userId }}</el-link>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="username" label="用户名" min-width="120" />
|
||||
<el-table-column label="队长" width="80" align="center">
|
||||
<template #default="{ row }">
|
||||
@@ -156,6 +161,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import {
|
||||
getGroupBuyList,
|
||||
@@ -167,6 +173,8 @@ import {
|
||||
} from '@/api/admin/activity'
|
||||
import { getGroupBuyTypeList, getGroupBuyTypeTags, removeGroupBuy, clearAllGroupBuy, clearUserGroupBuy } from '@/api/groupBuy'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// 数据状态
|
||||
const loading = ref(false)
|
||||
const exportLoading = ref(false)
|
||||
|
||||
@@ -172,7 +172,12 @@
|
||||
</el-avatar>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userId" label="用户ID" width="100" />
|
||||
<el-table-column label="用户ID" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-link v-if="row.userId" type="primary" :underline="false" @click="router.push({ path: '/user/detail', query: { user_id: row.userId } })">{{ row.userId }}</el-link>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="username" label="用户名" min-width="120" />
|
||||
<el-table-column label="队长" width="80" align="center">
|
||||
<template #default="{ row }">
|
||||
@@ -267,7 +272,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, watch } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import {
|
||||
getGroupBuyList,
|
||||
@@ -289,6 +294,7 @@ import {
|
||||
} from '@/api/groupBuy'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
// 当前激活的标签页
|
||||
const activeTab = ref('activity')
|
||||
|
||||
Reference in New Issue
Block a user