From 7a93b81e65f05753fef4ff197d021705f9cb36f8 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Wed, 18 Oct 2023 12:02:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 4 ++-- src/views/model/alert/deviceparamalert.vue | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.env.production b/.env.production index 2a6e755..539efd6 100644 --- a/.env.production +++ b/.env.production @@ -5,8 +5,8 @@ VITE_APP_TITLE = 联美管理驾驶舱 VITE_APP_ENV = 'production' # 若依管理系统/生产环境 -VITE_APP_BASE_API = 'http://10.10.10.56:9010' -VITE_APP_BASE_API_IMAGE = 'http://10.10.10.56:9010' +VITE_APP_BASE_API = '/prod-api/' +VITE_APP_BASE_API_IMAGE = '/prod-api/' # 是否在打包时开启压缩,支持 gzip 和 brotli VITE_BUILD_COMPRESS = gzip \ No newline at end of file diff --git a/src/views/model/alert/deviceparamalert.vue b/src/views/model/alert/deviceparamalert.vue index 4436ae8..86f6127 100644 --- a/src/views/model/alert/deviceparamalert.vue +++ b/src/views/model/alert/deviceparamalert.vue @@ -893,6 +893,8 @@ function getModelList(row){ element.id = item.alertModelId; proxy.$refs.policyTable.toggleRowSelection(element,true); return element; + }else{ + element.id = null; } }) }) @@ -985,6 +987,8 @@ function computeDelPolicy() { function computeAddPolicy() { const newSeletedRows = proxy.$refs.policyTable.getSelectionRows(); newSeletedRows.forEach(item=>{ + console.log('item'); + console.log(item); let flag = false; oldPolicyRows.value.forEach(element=>{ if(item.policyId == element.id){ @@ -992,9 +996,13 @@ function computeAddPolicy() { } }) if(!flag){ + console.log('policyParams-before'); + console.log(policyParams.value); policyParams.value = policyParams.value.filter(element=>{ return item.policyId !== element.id; }) + console.log('policyParams-after'); + console.log(policyParams.value); //为了新增不能传id给后台 let policyParam = {}; policyParam.deviceId = policyDeviceUuid.value;