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