可信代码库-软件列表软件详情可信度评分展示修改、登录注册展示修改

This commit is contained in:
付民康
2025-07-05 16:23:36 +08:00
parent a22d909b3a
commit 5c99b45376
5 changed files with 39 additions and 28 deletions

View File

@@ -49,7 +49,7 @@
<template v-if="!isLogin"> <template v-if="!isLogin">
<d-button @click="handleLogin('register')" class="min-w-[64px]">注册</d-button> <d-button @click="handleLogin('register')" class="min-w-[64px]">注册</d-button>
<d-button variant="solid" color="primary" @click="handleLogin('login')">账号密码登录</d-button> <d-button variant="solid" color="primary" @click="handleLogin('login')">账号登录</d-button>
</template> </template>
<template v-else> <template v-else>
<UserAvatar /> <UserAvatar />

View File

@@ -38,7 +38,7 @@
<span>搜索记录</span> <span>搜索记录</span>
</div> </div>
<d-button @click="handleLogin('register')" class="min-w-[64px]">注册</d-button> <d-button @click="handleLogin('register')" class="min-w-[64px]">注册</d-button>
<d-button variant="solid" color="primary" @click="handleLogin('login')">账号密码登录</d-button> <d-button variant="solid" color="primary" @click="handleLogin('login')">账号登录</d-button>
</template> </template>
<template v-else> <template v-else>
<!--ai copilot--> <!--ai copilot-->

View File

@@ -774,6 +774,7 @@ onUnmounted(() => {
<template> <template>
<Modal <Modal
:ti
v-model="vModels" v-model="vModels"
:show-close="showClose" :show-close="showClose"
:lock-scroll="lockScroll" :lock-scroll="lockScroll"
@@ -783,8 +784,12 @@ onUnmounted(() => {
:append-to-body="appendToBody" :append-to-body="appendToBody"
:class="['login-modal', formType === 'login' ? 'login-modal-l' : 'login-modal-r']" :class="['login-modal', formType === 'login' ? 'login-modal-l' : 'login-modal-r']"
> >
<template #header>
<div v-if="formType === 'login'" class="header-h1">国家可信开源代码库账号登录</div>
<div v-else class="header-h1">国家可信开源代码库账号注册</div>
</template>
<template #default> <template #default>
<div class="header-h1">国家可信开源代码库</div> <!-- <div v-if="formType === 'login'" class="header-h1">国家可信开源代码库账号登录</div>-->
<iframe :src="`https://gitcode.com/${formType || 'login'}/?be_nested=1`"></iframe> <iframe :src="`https://gitcode.com/${formType || 'login'}/?be_nested=1`"></iframe>
</template> </template>
</Modal> </Modal>
@@ -796,13 +801,13 @@ $active-color: var(--color-CG800);
$inactive-title: var(--color-CG500); $inactive-title: var(--color-CG500);
$active-panel: var(--color-G800); $active-panel: var(--color-G800);
.header-h1 { .header-h1 {
color: #252b3a;
letter-spacing: 0.5px; letter-spacing: 0.5px;
line-height: 24px; line-height: 24px;
font-weight: 700; font-size: 20px;
font-size: 26px; color: #000000;
text-align: center; padding-left: 16px;
margin-top: 24px; padding-bottom: 20px;
border-bottom: 1px solid #EDEDED;
*, :before, :after { *, :before, :after {
box-sizing: border-box; box-sizing: border-box;
border-width: 0; border-width: 0;
@@ -823,7 +828,7 @@ $active-panel: var(--color-G800);
} }
.login-modal { .login-modal {
box-sizing: border-box; box-sizing: border-box;
padding: 24px 28px 24px; padding: 24px 0;
width: 550px !important; width: 550px !important;
border-radius: 3px !important; border-radius: 3px !important;
.btn-close { .btn-close {
@@ -991,7 +996,7 @@ $active-panel: var(--color-G800);
} }
} }
.devui-modal__body { .devui-modal__body {
padding: 0; padding: 0 20px;
} }
.shaking-box { .shaking-box {
animation: shaking 0.25s ease-in-out; animation: shaking 0.25s ease-in-out;

View File

@@ -123,15 +123,18 @@
</template> </template>
<template v-else-if="column.key === 'securityScore'"> <template v-else-if="column.key === 'securityScore'">
<!-- <a @click="gotoDetail(scope.row)" style="--> <!-- <a @click="gotoDetail(scope.row)" style="-->
<a style=" <!-- <a style="-->
font-weight: bold; <!-- font-weight: bold;-->
color: #409EFF; <!-- color: #409EFF;-->
font-size: 16px; <!-- font-size: 16px;-->
">{{ scope.row.securityScore }}</a> <!-- ">{{ scope.row.securityScore }}</a>-->
<d-popover :content="scope.row.securityScore || '&#45;&#45;'" trigger="hover" style="background-color: #7693f5; color: #fff">
<d-tag color="#ef4444">{{ '非常重要' || '--' }}</d-tag>
</d-popover>
</template> </template>
<template v-else-if="column.key === 'trustScore'"> <template v-else-if="column.key === 'trustScore'">
<d-popover :content="scope.row.trustScore || '&#45;&#45;'" trigger="hover" style="background-color: #7693f5; color: #fff"> <d-popover :content="scope.row.trustScore || '&#45;&#45;'" trigger="hover" style="background-color: #7693f5; color: #fff">
<d-tag color="#ef4444">{{ '非常重要' || '--' }}</d-tag> <d-tag color="#ef4444">{{ '高度可信' || '--' }}</d-tag>
</d-popover> </d-popover>
</template> </template>
<template v-else-if="column.key === 'releaseDate'"> <template v-else-if="column.key === 'releaseDate'">
@@ -303,7 +306,7 @@ const openDelete = (row: any) => {
const defultColumns = ref([ const defultColumns = ref([
{ key: 'softwareName', label: '软件名称', visible: true, filterable: true, sortable: false }, { key: 'softwareName', label: '软件名称', visible: true, filterable: true, sortable: false },
{ key: 'softwareVersion', label: '软件版本', visible: true, filterable: true, sortable: false }, { key: 'softwareVersion', label: '软件版本', visible: true, filterable: true, sortable: false },
{ key: 'trustScore', label: '软件可信评分', visible: false, filterable: false, sortable: true, tooltip: true }, { key: 'trustScore', label: '软件可信评分', visible: true, filterable: false, sortable: true, tooltip: true },
{ key: 'securityScore', label: '软件重要性评分', visible: true, filterable: false, sortable: true }, { key: 'securityScore', label: '软件重要性评分', visible: true, filterable: false, sortable: true },
{ key: 'licenseNum', label: 'License数量', visible: true, filterable: false, sortable: false,width: 140 }, { key: 'licenseNum', label: 'License数量', visible: true, filterable: false, sortable: false,width: 140 },
{ key: 'industryCategory', label: '行业类型', visible: true, filterable: true, sortable: false }, { key: 'industryCategory', label: '行业类型', visible: true, filterable: true, sortable: false },
@@ -334,7 +337,7 @@ const defultColumns = ref([
const columns = ref([ const columns = ref([
{ key: 'softwareName', label: '软件名称', visible: true, filterable: true, sortable: false }, { key: 'softwareName', label: '软件名称', visible: true, filterable: true, sortable: false },
{ key: 'softwareVersion', label: '软件版本', visible: true, filterable: true, sortable: false }, { key: 'softwareVersion', label: '软件版本', visible: true, filterable: true, sortable: false },
{ key: 'trustScore', label: '软件可信评分', visible: false, filterable: false, sortable: true, tooltip: true }, { key: 'trustScore', label: '软件可信评分', visible: true, filterable: false, sortable: true, tooltip: true },
{ key: 'securityScore', label: '软件重要性评分', visible: true, filterable: false, sortable: true }, { key: 'securityScore', label: '软件重要性评分', visible: true, filterable: false, sortable: true },
{ key: 'licenseNum', label: 'License数量', visible: true, filterable: false, sortable: false,width: 140 }, { key: 'licenseNum', label: 'License数量', visible: true, filterable: false, sortable: false,width: 140 },
{ key: 'industryCategory', label: '行业类型', visible: true, filterable: true, sortable: false }, { key: 'industryCategory', label: '行业类型', visible: true, filterable: true, sortable: false },

View File

@@ -18,19 +18,22 @@
<span class="span1">可信度评分</span> <span class="span1">可信度评分</span>
<d-popover :content="ReleaseInfo.basicInfo.trustScore || '&#45;&#45;'" trigger="hover" style="background-color: #7693f5; color: #fff"> <d-popover :content="ReleaseInfo.basicInfo.trustScore || '&#45;&#45;'" trigger="hover" style="background-color: #7693f5; color: #fff">
<d-tag color="#ef4444">{{ '非常重要' || '--' }}</d-tag> <d-tag color="#ef4444">{{ '高度可信' || '--' }}</d-tag>
</d-popover> </d-popover>
<span class="split"></span> <span class="split"></span>
<span class="span1">重要性评分</span><span class="span2" <span class="span1">重要性评分</span>
style=" <d-popover :content="ReleaseInfo.basicInfo.securityScore || '&#45;&#45;'" trigger="hover" style="background-color: #7693f5; color: #fff">
font-weight: bold; <d-tag color="#ef4444">{{ '非常重要' || '--' }}</d-tag>
color: #409EFF; </d-popover>
font-size: 16px;
text-decoration: underline; <!-- <span class="span2" style="-->
cursor: pointer; <!-- font-weight: bold;-->
" <!-- color: #409EFF;-->
>{{ ReleaseInfo.networkSecurity.softwareRating || ReleaseInfo.basicInfo.securityScore || '&#45;&#45;' }}</span> <!-- font-size: 16px;-->
<!-- text-decoration: underline;-->
<!-- cursor: pointer;-->
<!-- ">{{ ReleaseInfo.networkSecurity.softwareRating || ReleaseInfo.basicInfo.securityScore || '&#45;&#45;' }}</span>-->
<span class="split"></span> <span class="split"></span>
<span class="span1">集成风险</span> <span class="span1">集成风险</span>
<d-tag :color="jcfxList[ReleaseInfo.referenceInfo.integrationRisk].color">{{ ReleaseInfo.referenceInfo.integrationRisk || jcfxList[ReleaseInfo.basicInfo.integrationRiskLevel].text || '--' }}</d-tag> <d-tag :color="jcfxList[ReleaseInfo.referenceInfo.integrationRisk].color">{{ ReleaseInfo.referenceInfo.integrationRisk || jcfxList[ReleaseInfo.basicInfo.integrationRiskLevel].text || '--' }}</d-tag>