File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 27
27
<el-button size =" small" class =" btn" >
28
28
<Icon icon =" ep:download" color =" #787878" />
29
29
</el-button >
30
- <el-button size =" small" class =" btn" @click =" handleGoTopMessage" >
30
+ <el-button size =" small" class =" btn" @click =" handleGoTopMessage" >
31
31
<Icon icon =" ep:top" color =" #787878" />
32
32
</el-button >
33
33
</div >
@@ -119,7 +119,6 @@ import MessageList from './components/message/MessageList.vue'
119
119
import MessageListEmpty from ' ./components/message/MessageListEmpty.vue'
120
120
import MessageLoading from ' ./components/message/MessageLoading.vue'
121
121
import MessageNewConversation from ' ./components/message/MessageNewConversation.vue'
122
- import { Download , Top } from ' @element-plus/icons-vue'
123
122
124
123
/** AI 聊天对话 列表 */
125
124
defineOptions ({ name: ' AiChat' })
Original file line number Diff line number Diff line change 56
56
width =" 180"
57
57
:formatter =" dateFormatter"
58
58
/>
59
- <el-table-column label =" 操作" align =" center" >
59
+ <el-table-column label =" 操作" align =" center" min-width = " 180 " >
60
60
<template #default =" scope " >
61
61
<el-button
62
62
link
66
66
>
67
67
编辑
68
68
</el-button >
69
+ <el-button
70
+ link
71
+ type =" primary"
72
+ v-if =" scope.row.parentId > 0"
73
+ @click =" handleViewSpu(scope.row.id)"
74
+ v-hasPermi =" ['product:spu:query']"
75
+ >
76
+ 查看商品
77
+ </el-button >
69
78
<el-button
70
79
link
71
80
type =" danger"
@@ -142,6 +151,15 @@ const handleDelete = async (id: number) => {
142
151
} catch {}
143
152
}
144
153
154
+ /** 查看商品操作 */
155
+ const router = useRouter () // 路由
156
+ const handleViewSpu = (id : number ) => {
157
+ router .push ({
158
+ name: ' ProductSpu' ,
159
+ query: { categoryId: id }
160
+ })
161
+ }
162
+
145
163
/** 初始化 **/
146
164
onMounted (() => {
147
165
getList ()
Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ import * as ProductCategoryApi from '@/api/mall/product/category'
244
244
defineOptions ({ name: ' ProductSpu' })
245
245
246
246
const message = useMessage () // 消息弹窗
247
+ const route = useRoute () // 路由
247
248
const { t } = useI18n () // 国际化
248
249
const { push } = useRouter () // 路由跳转
249
250
@@ -431,6 +432,11 @@ onActivated(() => {
431
432
432
433
/** 初始化 **/
433
434
onMounted (async () => {
435
+ // 解析路由的 categoryId
436
+ if (route .query .categoryId ) {
437
+ queryParams .value .categoryId = Number (route .query .categoryId )
438
+ }
439
+ // 获得商品信息
434
440
await getTabsCount ()
435
441
await getList ()
436
442
// 获得分类树
You can’t perform that action at this time.
0 commit comments