update: 首页bug修复,AI修复建议 & 许可证信息页面接口更新
This commit is contained in:
@@ -103,9 +103,9 @@ export function getRepairInfo() {
|
|||||||
url: '/api/v1/repo/repair/info',
|
url: '/api/v1/repo/repair/info',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
current: 1,
|
"current": 1,
|
||||||
size: 10,
|
"size": 10,
|
||||||
softwareId: 47
|
"softwareId": 47
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -113,12 +113,12 @@ export function getRepairInfo() {
|
|||||||
// 获取许可证列表
|
// 获取许可证列表
|
||||||
export function getLicenseList() {
|
export function getLicenseList() {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/v1/repo/license/list',
|
url: '/api/v1/repo/license/info',
|
||||||
method: 'GET',
|
method: 'POST',
|
||||||
params: {
|
data: {
|
||||||
current: 1,
|
"current": 1,
|
||||||
size: 10,
|
"size": 10,
|
||||||
softwareId: 47
|
"softwareId": 47
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
<d-layout class="dlayout">
|
<d-layout class="dlayout">
|
||||||
<d-header class="dheader">
|
<d-header class="dheader">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h1>Apache License 2.0</h1>
|
<h1>{{ data.licenseName }}</h1>
|
||||||
<d-icon style="cursor: pointer;" name="icon-close" @click="emit('close')"></d-icon>
|
<d-icon style="cursor: pointer;" name="icon-close" @click="emit('close')"></d-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-title">
|
<div class="sub-title">
|
||||||
<span>分数</span>
|
<span>分数</span>
|
||||||
<span>3</span>
|
<span>3</span>
|
||||||
<span>类型</span>
|
<span>类型</span>
|
||||||
<d-tag color="#3ac295" size="sm">获准的</d-tag>
|
<d-tag color="#3ac295" size="sm">{{ data.category }}</d-tag>
|
||||||
</div>
|
</div>
|
||||||
</d-header>
|
</d-header>
|
||||||
<d-content class="dcontent">
|
<d-content class="dcontent">
|
||||||
@@ -78,7 +78,11 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, defineEmits } from 'vue';
|
import { ref, defineEmits } from 'vue';
|
||||||
|
const props = defineProps({
|
||||||
|
data: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
})
|
||||||
const emit = defineEmits(['close']);
|
const emit = defineEmits(['close']);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<div class="ai-panel-header-title">
|
<div class="ai-panel-header-title">
|
||||||
<div>
|
<div>
|
||||||
<d-tag color="red-w98" class="mr-1" size="sm">严重</d-tag>
|
<d-tag color="red-w98" class="mr-1" size="sm">严重</d-tag>
|
||||||
<span>Morgan</span>
|
<span>{{ rowItem.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="cursor: pointer; display: flex; gap: 8px; align-items: center;" @click="rowItem.expand = !rowItem.expand">
|
<div style="cursor: pointer; display: flex; gap: 8px; align-items: center;" @click="rowItem.expand = !rowItem.expand">
|
||||||
<img style="width: 14px; height: 14px;" src="@/assets/imgs/jyh/collapseIcon.png">
|
<img style="width: 14px; height: 14px;" src="@/assets/imgs/jyh/collapseIcon.png">
|
||||||
@@ -44,9 +44,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="weak-text">升级版本</span>
|
<span class="weak-text">升级版本</span>
|
||||||
<span>xxx</span>
|
<span>1.7.0</span>
|
||||||
<img src="@/assets/imgs/jyh/ic_digital_power_next_step_@2x.png" class="icon-sm">
|
<img src="@/assets/imgs/jyh/ic_digital_power_next_step_@2x.png" class="icon-sm">
|
||||||
<span>xxx</span>
|
<span>1.9.1</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -106,25 +106,27 @@ const tableConfig = ref([
|
|||||||
const list = ref([
|
const list = ref([
|
||||||
{
|
{
|
||||||
expand: true,
|
expand: true,
|
||||||
|
title: 'Morgan',
|
||||||
data: {
|
data: {
|
||||||
listData: [
|
listData: [
|
||||||
{
|
{
|
||||||
securityProblemCode: '1',
|
securityProblemCode: '1',
|
||||||
type: '安全问题',
|
type: '安全问题',
|
||||||
CWEcode: 'CWE-123',
|
CWEcode: 'CWE-123',
|
||||||
score: 100
|
score: 70
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
securityProblemCode: '2',
|
securityProblemCode: '2',
|
||||||
type: '安全问题',
|
type: '安全问题',
|
||||||
CWEcode: 'CWE-123',
|
CWEcode: 'MIT-LICENSE',
|
||||||
score: 100
|
score: 89
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
expand: true,
|
expand: true,
|
||||||
|
title: 'webpack',
|
||||||
data: {
|
data: {
|
||||||
listData: [
|
listData: [
|
||||||
{
|
{
|
||||||
@@ -136,65 +138,8 @@ const list = ref([
|
|||||||
{
|
{
|
||||||
securityProblemCode: '2',
|
securityProblemCode: '2',
|
||||||
type: '安全问题',
|
type: '安全问题',
|
||||||
CWEcode: 'CWE-123',
|
CWEcode: 'MIT-LICENSE',
|
||||||
score: 100
|
score: 90
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
expand: true,
|
|
||||||
data: {
|
|
||||||
listData: [
|
|
||||||
{
|
|
||||||
securityProblemCode: '1',
|
|
||||||
type: '安全问题',
|
|
||||||
CWEcode: 'CWE-123',
|
|
||||||
score: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
securityProblemCode: '2',
|
|
||||||
type: '安全问题',
|
|
||||||
CWEcode: 'CWE-123',
|
|
||||||
score: 100
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
expand: true,
|
|
||||||
data: {
|
|
||||||
listData: [
|
|
||||||
{
|
|
||||||
securityProblemCode: '1',
|
|
||||||
type: '安全问题',
|
|
||||||
CWEcode: 'CWE-123',
|
|
||||||
score: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
securityProblemCode: '2',
|
|
||||||
type: '安全问题',
|
|
||||||
CWEcode: 'CWE-123',
|
|
||||||
score: 100
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
expand: true,
|
|
||||||
data: {
|
|
||||||
listData: [
|
|
||||||
{
|
|
||||||
securityProblemCode: '1',
|
|
||||||
type: '安全问题',
|
|
||||||
CWEcode: 'CWE-123',
|
|
||||||
score: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
securityProblemCode: '2',
|
|
||||||
type: '安全问题',
|
|
||||||
CWEcode: 'CWE-123',
|
|
||||||
score: 100
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
</d-dropdown-menu>
|
</d-dropdown-menu>
|
||||||
<d-button color="primary" variant="solid" @click="search">搜索</d-button>
|
<d-button color="primary" variant="solid" @click="search">搜索</d-button>
|
||||||
</div>
|
</div>
|
||||||
<d-button @click="check" ref="origin" icon="share" class="batch-btn">批量校验</d-button>
|
<d-button v-if="userStore.isLogin" @click="check" ref="origin" icon="share" class="batch-btn">批量校验</d-button>
|
||||||
<div class="home-information">
|
<div class="home-information">
|
||||||
<div class="info-title">
|
<div class="info-title">
|
||||||
<div class="sub-title">
|
<div class="sub-title">
|
||||||
@@ -71,11 +71,11 @@
|
|||||||
<div class="flex items-center justify-between w-full">
|
<div class="flex items-center justify-between w-full">
|
||||||
<div class="cursor-pointer notice-content flex gap-2 items-center" @click="openWarningDetail(item, index)">
|
<div class="cursor-pointer notice-content flex gap-2 items-center" @click="openWarningDetail(item, index)">
|
||||||
<span>{{ item.subject }}</span>
|
<span>{{ item.subject }}</span>
|
||||||
<d-tag :color="tagMap[item.importance]" size="sm">{{ item.importance }}</d-tag>
|
<d-tag :color="tagMap[item.importance].color" size="sm">{{ tagMap[item.importance].text }}</d-tag>
|
||||||
</div>
|
</div>
|
||||||
<div class="time-container">
|
<div class="time-container">
|
||||||
<d-icon name="icon-time"></d-icon>
|
<d-icon name="icon-time"></d-icon>
|
||||||
{{ item.pulishTime }}
|
<span>{{ item.publishTime }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -100,7 +100,9 @@ import { useRoute, useRouter } from 'vue-router';
|
|||||||
import AdvanceSearch from '@/components/AdvanceSearch/index.vue';
|
import AdvanceSearch from '@/components/AdvanceSearch/index.vue';
|
||||||
import { getHomeNoticeList } from '@/api/jyh'
|
import { getHomeNoticeList } from '@/api/jyh'
|
||||||
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
|
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
|
||||||
|
import { useAccountStore } from '@/stores/user';
|
||||||
|
|
||||||
|
const userStore = useAccountStore();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const inputGlow = ref(false);
|
const inputGlow = ref(false);
|
||||||
@@ -121,9 +123,18 @@ const homeSearch = ref(null);
|
|||||||
const dropdownWidth = ref(0);
|
const dropdownWidth = ref(0);
|
||||||
const selectedCate = ref('软件');
|
const selectedCate = ref('软件');
|
||||||
const tagMap = {
|
const tagMap = {
|
||||||
'高': '#f66f6a',
|
'High': {
|
||||||
'中': '#fac20a',
|
text: '高',
|
||||||
'低': '#5e7ce0'
|
color: '#f66f6a'
|
||||||
|
},
|
||||||
|
'Medium': {
|
||||||
|
text: '中',
|
||||||
|
color: '#fac20a'
|
||||||
|
},
|
||||||
|
'Low': {
|
||||||
|
text: '低',
|
||||||
|
color: '#5e7ce0'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const searchInput = ref(null);
|
const searchInput = ref(null);
|
||||||
@@ -235,7 +246,6 @@ getNoticeList();
|
|||||||
|
|
||||||
.home-content {
|
.home-content {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
height: 50%;
|
|
||||||
width: 50%;
|
width: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -408,7 +418,7 @@ getNoticeList();
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
width: 120px;
|
width: 150px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,15 @@
|
|||||||
<d-layout>
|
<d-layout>
|
||||||
<d-content class="dcontent">
|
<d-content class="dcontent">
|
||||||
<d-table :data="list" style="width: 100%;">
|
<d-table :data="list" style="width: 100%;">
|
||||||
|
<template #empty>
|
||||||
|
<NoData></NoData>
|
||||||
|
</template>
|
||||||
<d-column type="index" width="40"></d-column>
|
<d-column type="index" width="40"></d-column>
|
||||||
<d-column v-for="(column, index) in tableConfig" :field="column.field"
|
<d-column v-for="(column, index) in tableConfig" :field="column.field"
|
||||||
:header="column.header" :sortable="column.sortable" :sort-method="column.sortMethod"></d-column>
|
:header="column.header" :sortable="column.sortable" :sort-method="column.sortMethod"></d-column>
|
||||||
<d-column header="详情" width="100px">
|
<d-column header="详情" width="100px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<a class="devui-link" @click="openPanel">查看</a>
|
<a class="devui-link" @click="openPanel(scope.row)">查看</a>
|
||||||
</template>
|
</template>
|
||||||
</d-column>
|
</d-column>
|
||||||
</d-table>
|
</d-table>
|
||||||
@@ -30,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<d-drawer v-model="showDetail" style="width: 800px; padding: 20px" >
|
<d-drawer v-model="showDetail" style="width: 800px; padding: 20px" >
|
||||||
<SidePanel @close="close"/>
|
<SidePanel :data="currentData" @close="close"/>
|
||||||
</d-drawer>
|
</d-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -38,6 +41,8 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import SidePanel from '@/components/LicenseInfo/SidePanel.vue';
|
import SidePanel from '@/components/LicenseInfo/SidePanel.vue';
|
||||||
import { getLicenseList } from '@/api/jyh';
|
import { getLicenseList } from '@/api/jyh';
|
||||||
|
import NoData from '@/components/NoData/NoData.vue';
|
||||||
|
const currentData = ref(null);
|
||||||
const pager = ref({
|
const pager = ref({
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageSize: 30,
|
pageSize: 30,
|
||||||
@@ -52,7 +57,8 @@ const close = () => {
|
|||||||
showDetail.value = false;
|
showDetail.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const openPanel = () => {
|
const openPanel = (row) => {
|
||||||
|
currentData.value = row
|
||||||
showDetail.value = true;
|
showDetail.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +70,7 @@ const tableConfig = ref([
|
|||||||
sortMethod: null
|
sortMethod: null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'licenseType',
|
field: 'category',
|
||||||
header: '许可证种类',
|
header: '许可证种类',
|
||||||
sortable: false,
|
sortable: false,
|
||||||
sortMethod: null
|
sortMethod: null
|
||||||
@@ -84,34 +90,41 @@ const tableConfig = ref([
|
|||||||
])
|
])
|
||||||
|
|
||||||
const list = ref([
|
const list = ref([
|
||||||
{
|
// {
|
||||||
licenseName: 'Apache License 2.0',
|
// licenseName: 'Apache License 2.0',
|
||||||
licenseType: '获准的',
|
// licenseType: '获准的',
|
||||||
affectedComponent: 'org.apache.commons:commons-collections4',
|
// affectedComponent: 'org.apache.commons:commons-collections4',
|
||||||
version: '4.4',
|
// version: '4.4',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
licenseName: 'Apache License 2.0',
|
// licenseName: 'Apache License 2.0',
|
||||||
licenseType: '获准的',
|
// licenseType: '获准的',
|
||||||
affectedComponent: 'org.apache.commons:commons-collections4',
|
// affectedComponent: 'org.apache.commons:commons-collections4',
|
||||||
version: '4.4',
|
// version: '4.4',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
licenseName: 'Apache License 2.0',
|
// licenseName: 'Apache License 2.0',
|
||||||
licenseType: '获准的',
|
// licenseType: '获准的',
|
||||||
affectedComponent: 'org.apache.commons:commons-collections4',
|
// affectedComponent: 'org.apache.commons:commons-collections4',
|
||||||
version: '4.4',
|
// version: '4.4',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
licenseName: 'Apache License 2.0',
|
// licenseName: 'Apache License 2.0',
|
||||||
licenseType: '获准的',
|
// licenseType: '获准的',
|
||||||
affectedComponent: 'org.apache.commons:commons-collections4',
|
// affectedComponent: 'org.apache.commons:commons-collections4',
|
||||||
version: '4.4',
|
// version: '4.4',
|
||||||
}
|
// }
|
||||||
])
|
])
|
||||||
|
|
||||||
const getList = async() => {
|
const getList = async() => {
|
||||||
const res = await getLicenseList()
|
const res: any = await getLicenseList();
|
||||||
|
if (!res.error) {
|
||||||
|
console.log(res);
|
||||||
|
list.value = res.data.data.records;
|
||||||
|
pager.value.total = res.data.data.records.length;
|
||||||
|
} else {
|
||||||
|
list.value = [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
getList();
|
getList();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user