feat: 添加路由跳转,基本完成商品列表

This commit is contained in:
zc
2022-01-01 00:58:58 +08:00
parent 39f93d47d1
commit a0ffb4a10d

View File

@@ -111,7 +111,12 @@ import {page, removeGoods} from '@/api/pms/goods'
import {cascadeList} from '@/api/pms/category'
import {reactive, ref,onMounted, toRefs} from 'vue'
import {ElMessage, ElMessageBox, ElTree} from 'element-plus'
import { getCurrentInstance } from 'vue'
import {moneyFormatter} from '@/utils/filter'
const {proxy}: any = getCurrentInstance();
const state = reactive({
// 遮罩层
loading: true,
@@ -129,6 +134,9 @@ const state = reactive({
queryParams: {
name: undefined,
categoryId: undefined,
page:1,
limit:10,
total: 0
},
pageList: [],
categoryOptions: [],
@@ -180,11 +188,11 @@ function handleGoodsView(detail: any) {
}
function handleAdd() {
this.$router.push({path: 'goods-detail'})
proxy.$router.push({path: 'goods-detail'})
}
function handleUpdate(row: any) {
this.$router.push({path: 'goods-detail', query: {goodsId: row.id}})
proxy.$router.push({path: 'goods-detail', query: {goodsId: row.id}})
}
function handleDelete(row: any) {
@@ -204,7 +212,7 @@ function handleDelete(row: any) {
}
function handleRowClick(row: any) {
this.$refs.multipleTable.toggleRowSelection(row);
proxy.$refs.multipleTable.toggleRowSelection(row);
}
function handleSelectionChange(selection: any) {