From a0a9d8dd0b7f29a222c564163d4e818d4182de04 Mon Sep 17 00:00:00 2001 From: fuguobin Date: Thu, 28 Mar 2024 17:02:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/auto-imports.d.ts | 4 ++++ src/views/monitoring/screen/components/main.vue | 16 ++++++++-------- .../monitoring/screenData/components/main.vue | 16 ++++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index acba637..5742656 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -2,9 +2,11 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const ElForm: typeof import('element-plus/es')['ElForm'] const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const ElNotification: typeof import('element-plus/es')['ElNotification'] + const NEllipsis: typeof import('naive-ui')['NEllipsis'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] const computed: typeof import('vue')['computed'] @@ -271,9 +273,11 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface ComponentCustomProperties { readonly EffectScope: UnwrapRef + readonly ElForm: UnwrapRef readonly ElMessage: UnwrapRef readonly ElMessageBox: UnwrapRef readonly ElNotification: UnwrapRef + readonly NEllipsis: UnwrapRef readonly asyncComputed: UnwrapRef readonly autoResetRef: UnwrapRef readonly computed: UnwrapRef diff --git a/src/views/monitoring/screen/components/main.vue b/src/views/monitoring/screen/components/main.vue index 0d6719b..955afb5 100644 --- a/src/views/monitoring/screen/components/main.vue +++ b/src/views/monitoring/screen/components/main.vue @@ -439,7 +439,7 @@ function tableDatas() { }); } -const cellDBLClickEvent: VxeTableEvents.CellDblclick = ({ row, column }) => { +const cellDBLClickEvent: VxeTableEvents.CellDblclick = ({ row, column }) => { //双击单元格 //edit ty zhousq 2023-10-12 修改控制方式为接口方式,修改formdata提交的属性值 // ctrlPro.centeruuid 设备UUID cellField.ctrlPro.paramcode 设备参数编码 cellField.val 设备值 @@ -487,7 +487,7 @@ const formatRole: VxeColumnPropTypes.Formatter = ({ cellValue }) => { }; // 通用行合并函数(将相同多列数据合并为一行) -const mergeRowMethod: VxeTablePropTypes.SpanMethod = ({ row, _rowIndex, column, visibleData }) => { +const mergeRowMethod: VxeTablePropTypes.SpanMethod = ({ row, _rowIndex, column, visibleData }) => { // console.log('通用行合并渲染开始:', useDateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss').value); const fields = ['gTitle']; const cellValue = row[column.field]; @@ -525,12 +525,12 @@ const submitEvent: VxeFormEvents.Submit = () => { formLoading.value = false; editModal.value = false; - if ($table) { - const row = cellRow.value; - const field = cellColumn.value.field; - row[field].val = formData.value.value; - $table.reloadRow(row, null, field); - } + // if ($table) { + // const row = cellRow.value; + // const field = cellColumn.value.field; + // row[field].val = formData.value.value; + // $table.reloadRow(row, null, field); + // } // VXETable.modal.message({ content: '保存成功', status: 'success' }); }; diff --git a/src/views/monitoring/screenData/components/main.vue b/src/views/monitoring/screenData/components/main.vue index 58cf1e4..b6ff47e 100644 --- a/src/views/monitoring/screenData/components/main.vue +++ b/src/views/monitoring/screenData/components/main.vue @@ -469,7 +469,7 @@ function asyncTableDatas() { }); } -const cellDBLClickEvent: VxeTableEvents.CellDblclick = ({ row, column }) => { +const cellDBLClickEvent: VxeTableEvents.CellDblclick = ({ row, column }) => { //双击单元格 //edit ty zhousq 2023-10-12 修改控制方式为接口方式,修改formdata提交的属性值 // ctrlPro.centeruuid 设备UUID cellField.ctrlPro.paramcode 设备参数编码 cellField.val 设备值 @@ -515,7 +515,7 @@ const formatRole: VxeColumnPropTypes.Formatter = ({ cellValue }) => { }; // 通用行合并函数(将相同多列数据合并为一行) -const mergeRowMethod: VxeTablePropTypes.SpanMethod = ({ row, _rowIndex, column, visibleData }) => { +const mergeRowMethod: VxeTablePropTypes.SpanMethod = ({ row, _rowIndex, column, visibleData }) => { const fields = ['gTitle']; const cellValue = row[column.field]; if (cellValue && fields.includes(column.field)) { @@ -551,12 +551,12 @@ const submitEvent: VxeFormEvents.Submit = () => { formLoading.value = false; editModal.value = false; - if ($table) { - const row = cellRow.value; - const field = cellColumn.value.field; - row[field].val = formData.value.value; - $table.reloadRow(row, null, field); - } + // if ($table) { + // const row = cellRow.value; + // const field = cellColumn.value.field; + // row[field].val = formData.value.value; + // $table.reloadRow(row, null, field); + // } // VXETable.modal.message({ content: '保存成功', status: 'success' }); };