Merge branch 'master' of https://gitcode.com/hk_openRepo/OpenRepo_Portal into junjie_dev
# Conflicts: # src/views/Jyh/Home/index.vue
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="g-user-drawer-info-list">
|
<div class="g-user-drawer-info-list">
|
||||||
<div class="g-user-drawer-info-list-name">
|
<div class="g-user-drawer-info-list-name">
|
||||||
<span class="break-all">{{ accountInfo.username?accountInfo.username[0]:'' }}</span>
|
<span class="break-all">{{ accountInfo.username ? accountInfo.username[0] : '' }}</span>
|
||||||
<GIcon class="close-icon" name="gt-close" size="12" @click="handleClose" />
|
<GIcon class="close-icon" name="gt-close" size="12" @click="handleClose" />
|
||||||
</div>
|
</div>
|
||||||
<div class="g-user-drawer-info-list-id break-all">@{{ accountInfo.username }}</div>
|
<div class="g-user-drawer-info-list-id break-all">@{{ accountInfo.username }}</div>
|
||||||
@@ -69,6 +69,10 @@ const logout = async () => {
|
|||||||
router.go(0);
|
router.go(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 退出系统刷新页面
|
||||||
|
setTimeout(() => {
|
||||||
|
location.reload();
|
||||||
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClick = (item) => {
|
const handleClick = (item) => {
|
||||||
@@ -107,9 +111,7 @@ const getRouterLink = (params) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const blockList = ref([
|
const blockList = ref([
|
||||||
[
|
[{ id: 'myPage', label: '个人中心', to: getRouterLink('PersonalCenter') }],
|
||||||
{ id: 'myPage', label: '个人中心', to: getRouterLink('PersonalCenter') }
|
|
||||||
],
|
|
||||||
// [
|
// [
|
||||||
// // { id: 'dashboard', label: '工作台', icon: 'gt-member-c', to: getRouterLink('dashboard') },
|
// // { id: 'dashboard', label: '工作台', icon: 'gt-member-c', to: getRouterLink('dashboard') },
|
||||||
// // { id: 'myIssues', label: '我的 Issue', icon: 'gt-issue-c', to: getRouterLink('issues') },
|
// // { id: 'myIssues', label: '我的 Issue', icon: 'gt-issue-c', to: getRouterLink('issues') },
|
||||||
@@ -126,9 +128,7 @@ const blockList = ref([
|
|||||||
// { id: 'personalSetting', label: '个人设置', icon: 'gt-setting-c', to: getRouterLink('setting') },
|
// { id: 'personalSetting', label: '个人设置', icon: 'gt-setting-c', to: getRouterLink('setting') },
|
||||||
// { id: 'help', label: '帮助文档', icon: 'gt-file-c', href: 'https://gitcode.com/Gitcode-offical-team/GitCode-Docs/wiki' }
|
// { id: 'help', label: '帮助文档', icon: 'gt-file-c', href: 'https://gitcode.com/Gitcode-offical-team/GitCode-Docs/wiki' }
|
||||||
// ],
|
// ],
|
||||||
[
|
[{ id: 'logout', label: '退出登录', icon: 'gt-exit', action: logout }]
|
||||||
{ id: 'logout', label: '退出登录', icon: 'gt-exit', action: logout }
|
|
||||||
]
|
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="TableSetting">
|
<div class="TableSetting">
|
||||||
<d-button @click.stop="toggleColumnList" class="output-btn" icon="icon-form-settings" variant="text">设置</d-button>
|
<d-button @click.stop="toggleColumnList" class="output-btn" icon="icon-form-settings" variant="text">设置</d-button>
|
||||||
<!-- 多选列表 -->
|
<!-- 多选列表 -->
|
||||||
<div v-if="showColumnList" class="column-list">
|
<div v-if="showColumnList" ref="columnListRef" class="column-list">
|
||||||
<div class="column-list-header">
|
<div class="column-list-header">
|
||||||
<span class="title1">展示列设置</span>
|
<span class="title1">展示列设置</span>
|
||||||
<a class="title2">恢复默认</a>
|
<a class="title2">恢复默认</a>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, defineProps, defineEmits } from 'vue';
|
import { ref, defineProps, defineEmits,onMounted,onUnmounted } from 'vue';
|
||||||
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -42,6 +42,29 @@ const toggleColumnList = () => {
|
|||||||
const newValue = !props.showColumnList;
|
const newValue = !props.showColumnList;
|
||||||
emits('update:show-column-list', newValue); // 触发事件,更新父组件的 showColumnList
|
emits('update:show-column-list', newValue); // 触发事件,更新父组件的 showColumnList
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 关闭多选列表
|
||||||
|
const closeColumnList = () => {
|
||||||
|
emits('update:show-column-list', false);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 监听点击事件
|
||||||
|
const columnListRef = ref<HTMLElement | null>(null);
|
||||||
|
|
||||||
|
const handleClickOutside = (event: MouseEvent) => {
|
||||||
|
if (columnListRef.value && !columnListRef.value.contains(event.target as Node)) {
|
||||||
|
closeColumnList();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
document.addEventListener('click', handleClickOutside);
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
document.removeEventListener('click', handleClickOutside);
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.TableSetting {
|
.TableSetting {
|
||||||
|
|||||||
@@ -59,14 +59,18 @@
|
|||||||
</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 v-if="isLogin" @click="check" ref="origin" icon="share" class="batch-btn">批量校验</d-button>
|
<d-button @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">
|
||||||
<img src="@/assets/imgs/home/informIcon@2x.png" />
|
<img src="@/assets/imgs/home/informIcon@2x.png" />
|
||||||
<span>预警公告</span>
|
<span>预警公告</span>
|
||||||
</div>
|
</div>
|
||||||
<a v-if="isLogin" class="devui-link" @click="checkMore">更多 ></a>
|
|
||||||
|
<!-- <a v-if="accountInfo.access_token" class="devui-link" @click="checkMore"
|
||||||
|
>更多 <i class="icon icon-chevron-right-2"></i>
|
||||||
|
</a>
|
||||||
|
<span v-else class="text-blue-500">查看更多,请先登录</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="info-content">
|
<div class="info-content">
|
||||||
<d-timeline :direction="'vertical'" :time-position="'right'" :position="'right'">
|
<d-timeline :direction="'vertical'" :time-position="'right'" :position="'right'">
|
||||||
@@ -83,11 +87,11 @@
|
|||||||
@click="openWarningDetail(item, index)"
|
@click="openWarningDetail(item, index)"
|
||||||
>
|
>
|
||||||
<span>{{ item.subject }}</span>
|
<span>{{ item.subject }}</span>
|
||||||
<d-tag v-if="item.importance" :color="tagMap[item.importance].color" size="sm">{{ tagMap[item.importance].text }}</d-tag>
|
<d-tag :color="tagMap[item.importance]" size="sm">{{ item.importance }}</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.publishTime }}
|
{{ item.pulishTime }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -109,15 +113,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
import { useAccount } from '@/utils/hooks/useAccount';
|
||||||
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 { useDiscussGetUserInfo } from '@/api/discussion/hook';
|
|
||||||
import { useGlobalInfoStore } from '@/stores/Global';
|
import { useGlobalInfoStore } from '@/stores/Global';
|
||||||
|
|
||||||
const { updateHeaderSearch } = useGlobalInfoStore();
|
const { updateHeaderSearch } = useGlobalInfoStore();
|
||||||
// 获取当前用户信息 & 是否登录
|
const { accountInfo } = useAccount();
|
||||||
const { isLogin = false, userInfo = {}} = useDiscussGetUserInfo();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const inputGlow = ref(false);
|
const inputGlow = ref(false);
|
||||||
@@ -139,23 +142,10 @@ const homeSearch = ref(null);
|
|||||||
const dropdownWidth = ref(0);
|
const dropdownWidth = ref(0);
|
||||||
const selectedCate = ref('软件');
|
const selectedCate = ref('软件');
|
||||||
const tagMap = {
|
const tagMap = {
|
||||||
'Critical': {
|
高: '#f66f6a',
|
||||||
text: '致命',
|
中: '#fac20a',
|
||||||
color: '#c7000b'
|
低: '#5e7ce0'
|
||||||
},
|
};
|
||||||
'High': {
|
|
||||||
text: '高',
|
|
||||||
color: '#f66f6a'
|
|
||||||
},
|
|
||||||
'Medium': {
|
|
||||||
text: '中',
|
|
||||||
color: '#fac20a'
|
|
||||||
},
|
|
||||||
'Low': {
|
|
||||||
text: '低',
|
|
||||||
color: '#5e7ce0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const searchInput = ref(null);
|
const searchInput = ref(null);
|
||||||
const openAdvancedSearch = () => {
|
const openAdvancedSearch = () => {
|
||||||
@@ -244,7 +234,7 @@ onBeforeUnmount(() => {
|
|||||||
const getNoticeList = async () => {
|
const getNoticeList = async () => {
|
||||||
const res: any = await getHomeNoticeList();
|
const res: any = await getHomeNoticeList();
|
||||||
if (!res.error) {
|
if (!res.error) {
|
||||||
infoList.value = res.data.data;
|
infoList.value = res.data.data || [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -265,6 +255,7 @@ getNoticeList();
|
|||||||
|
|
||||||
.home-content {
|
.home-content {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
height: 80%;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -442,11 +433,8 @@ getNoticeList();
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
width: 150px;
|
width: 120px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.devui-timeline-item-data-right) {
|
:deep(.devui-timeline-item-data-right) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="license-info-content">
|
<div class="license-info-content">
|
||||||
<d-layout>
|
<d-layout>
|
||||||
<d-content class="dcontent">
|
<d-content class="dcontent">
|
||||||
<d-table :data="list" style="width: 100%;">
|
<d-table class="jyh-table" v-if="list.length>0" :data="list" style="width: 100%;">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<NoData></NoData>
|
<NoData></NoData>
|
||||||
</template>
|
</template>
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</d-column>
|
</d-column>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
<NoData v-else :small="false"></NoData>
|
||||||
</d-content>
|
</d-content>
|
||||||
</d-layout>
|
</d-layout>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -105,6 +105,7 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<d-button
|
<d-button
|
||||||
variant="text"
|
variant="text"
|
||||||
|
v-if="scope.row.validStatus == 0"
|
||||||
:disabled="scope.row.validStatus !== 0"
|
:disabled="scope.row.validStatus !== 0"
|
||||||
>
|
>
|
||||||
申请入库
|
申请入库
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<Card simple class="jyh-card mt-3">
|
<Card simple class="jyh-card mt-3">
|
||||||
<div class="clear-padding">
|
<div class="clear-padding">
|
||||||
<d-table :indent="32" @check-change="treeCheckChange" :data="baseTreeTableData1" row-key="id">
|
<d-table class="jyh-table" v-if="baseTreeTableData1.length>0" :indent="32" @check-change="treeCheckChange" :data="baseTreeTableData1" row-key="id">
|
||||||
<d-column field="firstName" header="组织名称" show-overflow-tooltip>
|
<d-column field="firstName" header="组织名称" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<a class="devui-link" @click="showDetail = true">{{ scope.row.firstName }}</a>
|
<a class="devui-link" @click="showDetail = true">{{ scope.row.firstName }}</a>
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
</d-column>
|
</d-column>
|
||||||
<d-column field="lastName" header="版本"></d-column>
|
<d-column field="lastName" header="版本"></d-column>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
<NoData v-else :small="false"></NoData>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
<d-drawer v-model="showDetail" style="width: 800px; padding: 20px">
|
<d-drawer v-model="showDetail" style="width: 800px; padding: 20px">
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import SBOMDetail from './SBOMDetail.vue';
|
import SBOMDetail from './SBOMDetail.vue';
|
||||||
|
import NoData from '@/components/NoData/NoData.vue';
|
||||||
import { dependencyTree } from '@/api/jyh';
|
import { dependencyTree } from '@/api/jyh';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
|||||||
@@ -237,8 +237,8 @@ const fetchVulnList = async () => {
|
|||||||
// softwareId: 47,
|
// softwareId: 47,
|
||||||
softwareId: propsData.versionId,
|
softwareId: propsData.versionId,
|
||||||
componentId: '',
|
componentId: '',
|
||||||
current: 1,
|
current: pager.value.pageIndex,
|
||||||
size: 10
|
size: pager.value.pageSize,
|
||||||
});
|
});
|
||||||
if(data.data.code===200) {
|
if(data.data.code===200) {
|
||||||
tableData.value = data?.data?.data?.records || [];
|
tableData.value = data?.data?.data?.records || [];
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getVulnDetail } from '@/api/jyh';
|
import { getVulnDetail } from '@/api/jyh';
|
||||||
import { ref } from 'vue';
|
import { ref,defineProps } from 'vue';
|
||||||
|
|
||||||
const propsData = defineProps(['softwareId', 'vulnId', 'vulnInfo']);
|
const propsData = defineProps(['softwareId', 'vulnId', 'vulnInfo']);
|
||||||
const vulnDetail = ref({});
|
const vulnDetail = ref({});
|
||||||
|
|||||||
Reference in New Issue
Block a user