parent
abfb305181
commit
06a323e6f0
|
@ -17,12 +17,12 @@
|
|||
<j-spin :spinning="loading">
|
||||
<div class="content">
|
||||
<j-scrollbar class="list" :max-height="450" v-if="list.length">
|
||||
<template v-for="i in list" :key="i.id">
|
||||
<template v-for="(i,index) in list" :key="i.id">
|
||||
<NoticeItem
|
||||
:data="i"
|
||||
:type="item.key"
|
||||
@action="emits('action')"
|
||||
@refresh="onRefresh(item.key)"
|
||||
@refresh="onRefresh(item.key,index)"
|
||||
/>
|
||||
</template>
|
||||
<div
|
||||
|
@ -114,7 +114,9 @@ const getData = (type: string[]) => {
|
|||
getList_api(params)
|
||||
.then((resp: any) => {
|
||||
total.value = resp.result.total;
|
||||
list.value = resp.result?.data || [];
|
||||
list.value = resp.result?.data?.filter((item:any)=>{
|
||||
return item?.state?.value === "unread"
|
||||
}) || [];
|
||||
})
|
||||
.finally(() => (loading.value = false));
|
||||
};
|
||||
|
@ -128,12 +130,13 @@ onMounted(async () => {
|
|||
onChange(props.tabs?.[0]?.key || "alarm");
|
||||
});
|
||||
|
||||
const onRefresh = (id: string) => {
|
||||
const onRefresh = (id: string,index:number) => {
|
||||
const flag = cloneDeep(refreshObj.value[id]);
|
||||
refreshObj.value = {
|
||||
...refreshObj.value,
|
||||
[id]: !flag,
|
||||
};
|
||||
list.value.splice(index,1);
|
||||
};
|
||||
|
||||
const onMore = (key: string) => {
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
)
|
||||
"
|
||||
>
|
||||
<j-radio-button :value="true"
|
||||
<j-radio-button :value="true" :disabled="formData.type ==='MQTT_CLIENT'"
|
||||
>共享配置</j-radio-button
|
||||
>
|
||||
<j-radio-button :value="false"
|
||||
|
@ -1280,6 +1280,9 @@ const changeType = (value: string) => {
|
|||
if (value !== 'MQTT_CLIENT') {
|
||||
const { configuration } = dynamicValidateForm.cluster[0];
|
||||
value && (configuration.host = '0.0.0.0');
|
||||
}else{
|
||||
formData.value.shareCluster = false
|
||||
changeShareCluster(formData.value.shareCluster)
|
||||
}
|
||||
if(value ==='TCP_SERVER'){
|
||||
getTs().then((res:any)=>{
|
||||
|
|
Loading…
Reference in New Issue