|
@@ -27,7 +27,7 @@ const props = defineProps({
|
|
})
|
|
})
|
|
|
|
|
|
const that = getCurrentInstance().proxy
|
|
const that = getCurrentInstance().proxy
|
|
-const groupId = ref('')
|
|
|
|
|
|
+const groupRef = ref('')
|
|
|
|
|
|
const {
|
|
const {
|
|
// 基础展示信息
|
|
// 基础展示信息
|
|
@@ -80,6 +80,15 @@ function onChangeGroup(id) {
|
|
doChangeGroup(id)
|
|
doChangeGroup(id)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function doClickMonitorActionsFn(item) {
|
|
|
|
+ // 未触发子组件change事件时,手动获取选中的分组
|
|
|
|
+ if (groupRef.value) {
|
|
|
|
+ const selected = groupRef.value.getSelected()
|
|
|
|
+ doChangeGroup(selected)
|
|
|
|
+ }
|
|
|
|
+ doClickMonitorActions(item.action || 'doCloseDialog')
|
|
|
|
+}
|
|
|
|
+
|
|
defineExpose({
|
|
defineExpose({
|
|
model,
|
|
model,
|
|
getParams
|
|
getParams
|
|
@@ -134,7 +143,7 @@ defineExpose({
|
|
class="action-button"
|
|
class="action-button"
|
|
:class="item.class"
|
|
:class="item.class"
|
|
:disabled="item.disabled"
|
|
:disabled="item.disabled"
|
|
- @click="doClickMonitorActions(item.action || 'doCloseDialog')"
|
|
|
|
|
|
+ @click="doClickMonitorActionsFn(item)"
|
|
>
|
|
>
|
|
{{ item.label }}
|
|
{{ item.label }}
|
|
</button>
|
|
</button>
|
|
@@ -142,6 +151,7 @@ defineExpose({
|
|
<!-- 选择监控分组 -->
|
|
<!-- 选择监控分组 -->
|
|
<MonitorGroup
|
|
<MonitorGroup
|
|
v-if="dialogConfig.template === 'group'"
|
|
v-if="dialogConfig.template === 'group'"
|
|
|
|
+ ref="groupRef"
|
|
:list="groupList"
|
|
:list="groupList"
|
|
@emitDisabled="onGroupDisabled"
|
|
@emitDisabled="onGroupDisabled"
|
|
@onChange="onChangeGroup"
|
|
@onChange="onChangeGroup"
|