From a0ffb4a10d850db183cbc6aa3f56d56235691f0e Mon Sep 17 00:00:00 2001 From: zc <> Date: Sat, 1 Jan 2022 00:58:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=EF=BC=8C=E5=9F=BA=E6=9C=AC=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pms/goods/index.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/views/pms/goods/index.vue b/src/views/pms/goods/index.vue index 91af0b23..31924367 100644 --- a/src/views/pms/goods/index.vue +++ b/src/views/pms/goods/index.vue @@ -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) {