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') }}
-
+