diff --git a/src/components/base-dialog/addOrUpdate/index.vue b/src/components/base-dialog/addOrUpdate/index.vue index 38f5330..ba96e3b 100644 --- a/src/components/base-dialog/addOrUpdate/index.vue +++ b/src/components/base-dialog/addOrUpdate/index.vue @@ -5,6 +5,7 @@ + >> .hidden-input { + display: none; +} diff --git a/src/components/base-table/components/detailComponent.js b/src/components/base-table/components/detailComponent.js index 18b98bd..8bf5d4f 100644 --- a/src/components/base-table/components/detailComponent.js +++ b/src/components/base-table/components/detailComponent.js @@ -22,13 +22,15 @@ export default { }, methods: { emitClick() { - this.$emit('emitData', { - action: this.injectData.actionName || 'view-detail-action', - data: this.injectData.emitFullData ? this.injectData : { id: this.injectData.id } + console.log('inject data:' ,this.injectData) + this.$emit('emit-data', { + type: this.injectData.head?.actionName || 'view-detail-action', + data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id }) } }, render: function (h) { - return h('span', null, [h('el-button', { props: { type: 'text' }, style: { paddingLeft: 0 } }, this.injectData.buttonContent || this.defaultText)]) + // console.log(this) + return h('span', null, [h('el-button', { props: { type: 'text' }, style: { paddingLeft: 0 }, on: { click: this.emitClick } }, this.injectData.buttonContent || this.defaultText)]) } } \ No newline at end of file diff --git a/src/views/modules/monitoring/equipmentGroup.vue b/src/views/modules/monitoring/equipmentGroup.vue index a9e99ea..839b47c 100644 --- a/src/views/modules/monitoring/equipmentGroup.vue +++ b/src/views/modules/monitoring/equipmentGroup.vue @@ -60,7 +60,7 @@ const tableConfigs = [ { prop: 'name', name: '分组名称' }, { prop: 'code', name: '分组编码' }, { prop: 'remark', name: '备注' }, - { prop: 'alarm', name: '报警', buttonContent: '查看报警', subcomponent: TableTextComponent }, + { prop: 'alarm', name: '报警', buttonContent: '查看报警', subcomponent: TableTextComponent, actionName: 'view-alarm' }, { prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] } ] @@ -131,6 +131,17 @@ export default { }, handleOperations({ type, data: id }) { switch (type) { + case 'view-alarm': + const {name, code} = this.dataList.find(item => item.id === id) + this.$router.push({ + name: 'monitoring-equipmentGroupAlarm', + params: { + groupName: name, + groupCode: code, + id + } + }) + break case 'edit': return this.addOrUpdateHandle(id) case 'delete': diff --git a/src/views/modules/monitoring/equipmentGroupAlarm.vue b/src/views/modules/monitoring/equipmentGroupAlarm.vue index 694942a..d92dea9 100644 --- a/src/views/modules/monitoring/equipmentGroupAlarm.vue +++ b/src/views/modules/monitoring/equipmentGroupAlarm.vue @@ -1,21 +1,24 @@