feat: 添加用户ID和订单ID链接跳转功能
- 在团购活动页面中为用户ID添加点击跳转到用户详情的功能 - 在团购管理页面中为用户ID添加点击跳转到用户详情的功能 - 在审核相关页面中为容器ID添加点击跳转到容器详情的功能 - 在营销相关页面中为用户ID和订单ID添加点击跳转功能 - 在订单列表页面中为用户ID和商品ID添加点击跳转功能 - 在商品列表页面中为用户和商品添加点击跳转功能 - 在工单列表页面中为用户名添加点击跳转到用户详情的功能 - 在用户虚拟机列表中为商品和用户添加点击跳转功能 - 在用户余额页面中为支付订单ID添加点击跳转到订单详情的功能 - 统一使用el-link组件实现可点击的链接样式 - 添加useRouter依赖并创建router实例用于页面跳转
This commit is contained in:
@@ -71,7 +71,8 @@
|
||||
<el-table-column prop="discountId" label="代金券ID" width="120" v-if="!codeId" />
|
||||
<el-table-column label="用户名" min-width="150">
|
||||
<template #default="{ row }">
|
||||
{{ row?.user?.user_name || '-' }}
|
||||
<el-link v-if="row.userId && row?.user?.user_name" type="primary" :underline="false" @click="router.push({ path: '/user/detail', query: { user_id: row.userId } })">{{ row.user.user_name }}</el-link>
|
||||
<span v-else>{{ row?.user?.user_name || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机号" min-width="150">
|
||||
@@ -239,6 +240,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { Delete, Search, Plus, Refresh, User } from '@element-plus/icons-vue'
|
||||
import {
|
||||
@@ -261,6 +263,8 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// 查询参数
|
||||
const queryParams = reactive({
|
||||
code_id: props.codeId || '',
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -40,7 +40,12 @@
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="Id" label="ID" width="80" />
|
||||
<el-table-column prop="UserId" label="用户ID" min-width="100" />
|
||||
<el-table-column label="用户ID" min-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 label="代金券ID" min-width="110" v-if="!codeId">
|
||||
<template #default="{ row }">
|
||||
{{ row.discountId || '-' }}
|
||||
@@ -212,6 +217,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { Search, Refresh, Plus, User } from '@element-plus/icons-vue'
|
||||
import {
|
||||
@@ -230,6 +236,8 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// 查询参数
|
||||
const queryParams = reactive({
|
||||
user_id: undefined,
|
||||
|
||||
Reference in New Issue
Block a user