Yunfei Du 2024-03-28 16:25:21 +08:00
parent 9c60ed8699
commit 83bdad0800
2 changed files with 16 additions and 1 deletions

View File

@ -80,7 +80,7 @@ export const constantRoutes = [
redirect: 'product-detail', redirect: 'product-detail',
children: [ children: [
{ {
path: 'product-detail', path: 'product-detail/:id',
component: () => import('@/views/product/info/detail/index'), component: () => import('@/views/product/info/detail/index'),
name: 'Demo', name: 'Demo',
meta: {title: '商品详情', icon: 'dashboard', affix: true} meta: {title: '商品详情', icon: 'dashboard', affix: true}

View File

@ -129,6 +129,12 @@
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['product:info:remove']" v-hasPermi="['product:info:remove']"
>删除</el-button> >删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-info"
@click="handleDetail(scope.row.id)"
>查看详细信息</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -773,6 +779,15 @@ export default {
} }
}); });
}, },
/** 查询详细信息 */
handleDetail(id){
// this.$router.push SPA 使
this.$router.push("/product-detail/"+id)
// window.open
// let url = `${window.location.origin}/product-detail/${detailId}`
// window.open(url);
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;