<template>
    <div class="index-notice" v-if="loadNotice!=null">
  <div v-for="(it,idx) in noticeList" :key="idx" class="notice-item">
    <div style="font-size: 12px;color: #333;" v-if="false"> 
    <svg-icon class="icon-info" icon-class="info" v-if="it.type=='info'" color="orange"></svg-icon>
    <svg-icon class="icon-warn" icon-class="warn" v-if="it.type=='warn'" color="red"></svg-icon>
    {{ it.type=="info"?"系统信息":"告警信息" }}
    </div>
    <div style="color: #666;padding: 0px 12px;">
        {{ it.operation_result }}
    </div>
    <div style="text-align: right;color: #666;padding:0px 12px;border-bottom: solid 1px #eee;">
        {{ it.update_time }}
        </div>
  </div>
</div>
</template>

<script lang='ts' setup>
import LogApi from '@/api/log'
let noticeList=ref<any>(null);
const loadNotice=()=>{
  LogApi.userOperationNotice().then(d=>{
    noticeList.value=d.data?.data?.operation_notice_list||[]
  })
}
onMounted(()=>{
  loadNotice();
});
</script>
<style  lang='scss'>
.index-notice{
.notice-item{
   font-size: 12px;
   line-height: 30px;}
}
</style>