From d493b34a5f624301b07c3a2b0cc2322b92bdbba7 Mon Sep 17 00:00:00 2001 From: g7hoo Date: Wed, 28 Sep 2022 10:39:06 +0800 Subject: [PATCH] =?UTF-8?q?update=20table=20=E7=B4=A2=E5=BC=95=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/base-dialog/AttrForm/index.vue | 2 ++ src/components/base-table/index.vue | 13 ++++++++++++- src/views/modules/monitoring/equipment.vue | 2 +- src/views/modules/monitoring/equipmentAlarmLog.vue | 2 +- .../modules/monitoring/equipmentCurrentState.vue | 2 +- src/views/modules/monitoring/equipmentGroup.vue | 2 +- .../modules/monitoring/equipmentGroupAlarm.vue | 8 ++++---- .../monitoring/equipmentHistoricalParameters.vue | 2 +- .../modules/monitoring/equipmentPlcConnect.vue | 2 +- src/views/modules/monitoring/equipmentPlcParam.vue | 2 +- src/views/modules/monitoring/equipmentQuantity.vue | 2 +- src/views/modules/monitoring/equipmentStatusLog.vue | 2 +- src/views/modules/monitoring/equipmentType.vue | 2 +- src/views/modules/monitoring/equipmentattr.vue | 2 +- src/views/modules/monitoring/factory.vue | 2 +- src/views/modules/monitoring/product.vue | 2 +- src/views/modules/monitoring/productionLine.vue | 2 +- .../modules/monitoring/qualityInspectionDet.vue | 2 +- .../modules/monitoring/qualityInspectionRecord.vue | 2 +- .../modules/monitoring/qualityInspectionType.vue | 2 +- src/views/modules/monitoring/reportCategory.vue | 2 +- src/views/modules/monitoring/reportDetail.vue | 2 +- .../modules/monitoring/reportSheetCategory.vue | 2 +- src/views/modules/monitoring/sysfile.vue | 2 +- src/views/modules/monitoring/sysfileType.vue | 2 +- src/views/modules/monitoring/workShopSection.vue | 2 +- .../modules/monitoring/workShopSectionEquipment.vue | 2 +- .../modules/monitoring/workshopSectionDialog.vue | 2 +- 28 files changed, 43 insertions(+), 30 deletions(-) diff --git a/src/components/base-dialog/AttrForm/index.vue b/src/components/base-dialog/AttrForm/index.vue index 26be59b..5e9f505 100644 --- a/src/components/base-dialog/AttrForm/index.vue +++ b/src/components/base-dialog/AttrForm/index.vue @@ -9,6 +9,8 @@ :is="require('../../base-table/index.vue').default" :table-head-configs="filterTableConfigs()" :data="dataList" + :page="pageIndex" + :size="pageSize" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" /> diff --git a/src/components/base-table/index.vue b/src/components/base-table/index.vue index 44ec01c..e864e95 100644 --- a/src/components/base-table/index.vue +++ b/src/components/base-table/index.vue @@ -20,6 +20,9 @@ :header-align="head.align || 'center'" :align="head.align || 'center'" :width="head.width || 50" + :index="head.type === 'index' ? val => { + return val + 1 + (page - 1) * size + } : null" v-bind="head.more" > @@ -74,9 +77,17 @@ export default { spanMethod: { type: Function, default: () => { - () => [0, 0] + ;() => [0, 0] }, required: false + }, + page: { + type: Number, + default: 1 + }, + size: { + type: Number, + default: 10 } }, filters: { diff --git a/src/views/modules/monitoring/equipment.vue b/src/views/modules/monitoring/equipment.vue index 775299f..6761e37 100644 --- a/src/views/modules/monitoring/equipment.vue +++ b/src/views/modules/monitoring/equipment.vue @@ -11,7 +11,7 @@ - + - + - + - + - + import { calcMaxHeight } from '@/utils' -import { timeFilter } from '@/utils/filters' +import { timeFilter, dictFilter } from '@/utils/filters' // import AddOrUpdate from './equipmentGroupAlarm-add-or-update' import AddOrUpdate from '@/components/base-dialog/addOrUpdate' import i18n from '@/i18n' @@ -61,8 +61,8 @@ const tableConfigs = [ }, { prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter }, { prop: 'code', name: i18n.t('alarm.code') }, - { prop: 'typeDictValue', name: i18n.t('alarm.type') }, - { prop: 'gradeDictValue', name: i18n.t('alarm.level') }, + { prop: 'typeDictValue', name: i18n.t('alarm.type'), filter: dictFilter(dictEntries.alarmType.value) }, + { prop: 'gradeDictValue', name: i18n.t('alarm.level'), filter: dictFilter(dictEntries.alarmLevel.value) }, { prop: 'alarmContent', name: i18n.t('alarm.content') }, { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] diff --git a/src/views/modules/monitoring/equipmentHistoricalParameters.vue b/src/views/modules/monitoring/equipmentHistoricalParameters.vue index 61ec2e3..b9a0b63 100644 --- a/src/views/modules/monitoring/equipmentHistoricalParameters.vue +++ b/src/views/modules/monitoring/equipmentHistoricalParameters.vue @@ -6,7 +6,7 @@ > - + diff --git a/src/views/modules/monitoring/equipmentPlcConnect.vue b/src/views/modules/monitoring/equipmentPlcConnect.vue index 21d0ec5..1b508fe 100644 --- a/src/views/modules/monitoring/equipmentPlcConnect.vue +++ b/src/views/modules/monitoring/equipmentPlcConnect.vue @@ -10,7 +10,7 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + {{ $t('add') }}
- +