update: 严重程度tag更新
This commit is contained in:
@@ -87,11 +87,11 @@
|
||||
@click="openWarningDetail(item, index)"
|
||||
>
|
||||
<span>{{ item.subject }}</span>
|
||||
<d-tag :color="tagMap[item.importance]" size="sm">{{ item.importance }}</d-tag>
|
||||
<d-tag v-if="item.importance" :color="tagMap[item.importance].color" size="sm">{{ tagMap[item.importance].text }}</d-tag>
|
||||
</div>
|
||||
<div class="time-container">
|
||||
<d-icon name="icon-time"></d-icon>
|
||||
{{ item.pulishTime }}
|
||||
{{ item.publishTime }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -142,10 +142,23 @@ const homeSearch = ref(null);
|
||||
const dropdownWidth = ref(0);
|
||||
const selectedCate = ref('软件');
|
||||
const tagMap = {
|
||||
高: '#f66f6a',
|
||||
中: '#fac20a',
|
||||
低: '#5e7ce0'
|
||||
};
|
||||
'Critical': {
|
||||
text: '致命',
|
||||
color: '#c7000b'
|
||||
},
|
||||
'High': {
|
||||
text: '高',
|
||||
color: '#f66f6a'
|
||||
},
|
||||
'Medium': {
|
||||
text: '中',
|
||||
color: '#fac20a'
|
||||
},
|
||||
'Low': {
|
||||
text: '低',
|
||||
color: '#5e7ce0'
|
||||
}
|
||||
}
|
||||
|
||||
const searchInput = ref(null);
|
||||
const openAdvancedSearch = () => {
|
||||
@@ -433,7 +446,7 @@ getNoticeList();
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
width: 120px;
|
||||
width: 140px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="sub-title mt-3">
|
||||
<div>
|
||||
<span>重要性</span>
|
||||
<d-tag type="danger" size="sm">{{warningData.importance}}</d-tag>
|
||||
<d-tag size="sm" :color="tagMap[warningData.importance].color">{{tagMap[warningData.importance].text}}</d-tag>
|
||||
</div>
|
||||
<div v-if="propsData.type === 'system'">
|
||||
<d-button v-show="mode === 'readonly'" class="edit-btn" icon="icon-edit" variant="text" title="编辑" @click="handleModeChange"/>
|
||||
@@ -39,6 +39,24 @@ const toolbarConfig = [
|
||||
['h1', 'h2', 'bold', 'italic', 'strike', 'underline', 'color', 'font'],
|
||||
['ul', 'ol', 'checklist', 'code', 'link', 'image', 'table'],
|
||||
];
|
||||
const tagMap = {
|
||||
'Critical': {
|
||||
text: '致命',
|
||||
color: '#c7000b'
|
||||
},
|
||||
'High': {
|
||||
text: '高',
|
||||
color: '#f66f6a'
|
||||
},
|
||||
'Medium': {
|
||||
text: '中',
|
||||
color: '#fac20a'
|
||||
},
|
||||
'Low': {
|
||||
text: '低',
|
||||
color: '#5e7ce0'
|
||||
}
|
||||
}
|
||||
const mode = ref('readonly');
|
||||
console.log(propsData.warningData)
|
||||
warningData.value = propsData.warningData ?? {
|
||||
|
||||
Reference in New Issue
Block a user