|
@@ -31,7 +31,7 @@
|
|
|
<template #bodyCell="{ column, record }">
|
|
<template #bodyCell="{ column, record }">
|
|
|
<template v-if="column.key === 'action'">
|
|
<template v-if="column.key === 'action'">
|
|
|
<a-space>
|
|
<a-space>
|
|
|
- <a href="#">查看</a>
|
|
|
|
|
|
|
+ <a href="#" @click="goDetailPage(record.id)" >查看</a>
|
|
|
<a-popconfirm
|
|
<a-popconfirm
|
|
|
title="确实要删除吗?"
|
|
title="确实要删除吗?"
|
|
|
ok-text="确定"
|
|
ok-text="确定"
|
|
@@ -83,6 +83,7 @@ import { CommonController, ModelController } from '@/controller/index'
|
|
|
import { onMounted, reactive } from 'vue'
|
|
import { onMounted, reactive } from 'vue'
|
|
|
import { computed } from '@vue/reactivity'
|
|
import { computed } from '@vue/reactivity'
|
|
|
import { Form } from 'ant-design-vue'
|
|
import { Form } from 'ant-design-vue'
|
|
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
|
|
|
|
|
const columns = [
|
|
const columns = [
|
|
|
{
|
|
{
|
|
@@ -137,6 +138,8 @@ const modalTitle = computed(() => state.opraState === 'add' ? '新增产品' : '
|
|
|
|
|
|
|
|
const useForm = Form.useForm
|
|
const useForm = Form.useForm
|
|
|
|
|
|
|
|
|
|
+const router = useRouter()
|
|
|
|
|
+
|
|
|
const modelRef = reactive({
|
|
const modelRef = reactive({
|
|
|
modelLabel: '',
|
|
modelLabel: '',
|
|
|
transportType: '',
|
|
transportType: '',
|
|
@@ -161,6 +164,10 @@ const ok = () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const goDetailPage = (id: string) => {
|
|
|
|
|
+ router.push({ path: '/product/detail', query: { id } })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const confirmDel = async (id: string) => {
|
|
const confirmDel = async (id: string) => {
|
|
|
await ModelController.del(id)
|
|
await ModelController.del(id)
|
|
|
getModel()
|
|
getModel()
|