From 94e9ec95b79bf4c301b35a3b3463ab6faed48ec7 Mon Sep 17 00:00:00 2001 From: "@user8949" Date: Mon, 17 Mar 2025 15:58:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20ai=E4=BF=AE=E5=A4=8D=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=9B=B4=E6=96=B0=20&=20=E4=BE=9D=E8=B5=96=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/imgs/jyh/aiIcon.png | Bin 0 -> 1387 bytes src/assets/imgs/jyh/closeAll.png | Bin 0 -> 290 bytes src/assets/imgs/jyh/infoIcon.png | Bin 0 -> 406 bytes src/assets/imgs/jyh/openAll.png | Bin 0 -> 291 bytes src/views/Jyh/AIRepair/index.vue | 79 ++++++ src/views/Jyh/Version/Detail/Dependency.vue | 254 ++++++++++++++++++++ src/views/Jyh/Version/Detail/index.vue | 2 + 7 files changed, 335 insertions(+) create mode 100644 src/assets/imgs/jyh/aiIcon.png create mode 100644 src/assets/imgs/jyh/closeAll.png create mode 100644 src/assets/imgs/jyh/infoIcon.png create mode 100644 src/assets/imgs/jyh/openAll.png create mode 100644 src/views/Jyh/Version/Detail/Dependency.vue diff --git a/src/assets/imgs/jyh/aiIcon.png b/src/assets/imgs/jyh/aiIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..fe211bc759b03e12dd0d637d7c578f37f69cb222 GIT binary patch literal 1387 zcmV-x1(f=UP)ByL`Hg_u!TmqGmzwOdxb?fLD6O#l8U;=Ty ztm@2xcSdr`c#y;_0}#~EHP_5qV4s|!x1*~K0L0LUMfbBOJG1d|8_xfw3>ygmV1T%E z5fvNiz+!Vi5LmEbS!uxj7iU$q3GO&Ip$J$YAMU(~2rMm$38GRL19IMm{vvLO^noQpEewg02?9=H@_>x5I5^1zqU4(n(AqyCBIf)e5?# zx4JnrML?8TsQxL{Ks5@wYQhbD`( zWw8bzYGp!A0R%{A_!`S2*ZGZs8+vxa7GBO4gM+KHWKkAaunh;S`?ve*=&@C*68Uf> z2;}^Bf49oaw7DC99@iXLdj35-UhpkeK#YX|vjjsP?3-b4(h~kv+aZJ^!jS#X`l8%Q zQU4Re`Q_nGb=QwqGzF}QNyNoQB>;u?d)%4=4(;r8L0mSl0whtO3)gJ%{zxXvAO`>f zSo+=1Z&6_pVgD20WC|Jg?jQ0R5#r>6;S!N!F=dI71zTBWWWA1_#30<%r^SJRX@LSn z-~q+ICD{i8j}Z6-_Ta#VYi3BYN2fnJnNqvA81`)X>Fh4_7SaaB4xGRWT((#n+n|s# zZXw0aubVsTU9`muNW#7yzCZ!Oc#wfdV2_*+ze%aSCjt$_r>zVyo1*8=?n19g8|Unn zw0hvX88+#_HDsKNkF+m}__CmXo3HjfZHnXp^gYf30A6_}IJfz0)&TI(x4!B<75#Sl tpG4ndMwJ9?-^=|gOs9nwT4-UJ@GlTbH~3ZZI-dXl002ovPDHLkV1hZGkAnaJ literal 0 HcmV?d00001 diff --git a/src/assets/imgs/jyh/closeAll.png b/src/assets/imgs/jyh/closeAll.png new file mode 100644 index 0000000000000000000000000000000000000000..5d606aeff8434d66a5eda4f9ae92c56004b230ba GIT binary patch literal 290 zcmV+-0p0$IP)71Q{00004b3#c}2nYxW zdXLmHJQ7 zhv+HEw+%Q-L;^E+xmS4t&Fs4LDiH~#4<9P3YP)8`=}Qm*fQb6ld$s^enr`f(sx31c z0H`X7NC5oau*t*1%$=Dv0OIZ^OaK7Q!j7uix&RB%Ib5_Qr9^Zah9SIy5>cQ3<64Jn zOXjcNkZVdy+SE(msWhIBFZ=^wNj|MDgT)M*)^YbYoMz5N2#L~>1tRB7s=gvnCJ~VcQ3DWE(BS^!%lVK!Ljz+&f4Fk=!oN7}16OV!Z07*qoM6N<$f@_|x ARsaA1 literal 0 HcmV?d00001 diff --git a/src/assets/imgs/jyh/openAll.png b/src/assets/imgs/jyh/openAll.png new file mode 100644 index 0000000000000000000000000000000000000000..17dcf1ac8e829c8e886c0ce61306838401cf2d62 GIT binary patch literal 291 zcmeAS@N?(olHy`uVBq!ia0vp^GC(ZB!3HE>&Y9Z;q*#ibJVQ8upoSx*1IWMS>EamT z(fM}TLEdHq9@n>Bia+9(8A!fNX-O5@R-j+#s;Q+a5VEq?U7?b(?u~$`i;GOdzICsU ztt-@&Y?#*}rxcodyzq<7{*8k2$vM|kf?u}IZ1<7W?VWq#Pf6m-pYJ~SYbo`0XtX?F z&=3slnaKF1I_{k^!wSz{@4&}Q%ehwzX`0UX`AsS1nPceYmTW~1#T|1h|JRu7DEWo% zKJzg@c-N72wL7K-W&2ml%>HrlQrVXl&6ewxGuGsWwg%nuIn1=c|LJA +
+
+
+ + AI修复建议: +
+
+
    +
  • {{ info }}
  • +
+
+
+
@@ -43,6 +56,7 @@ @@ -55,6 +69,11 @@ import { ref } from 'vue'; import Panel from '@/components/AIRepair/Panel.vue'; import Table from '@/components/AIRepair/Table.vue'; +const infoList = ref([ + '当前代码主要风险为易受常见的注入攻击,包括命令注入、SQL注入、表达式注入,针对每种攻击,应提供相应的防范措施,如数据校验、使用安全函数和限制程序权限。', + '相对上一次检查,【提升点】在于代码基础编码问题少了47.8%,问题总数降低29.3%;' +]) + const tableConfig = ref([ { field: 'securityProblemCode', @@ -122,6 +141,44 @@ const list = ref([ ] } }, + { + 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: { @@ -204,4 +261,26 @@ const list = ref([ width: 14px; height: 14px; } + +.info-outside { + margin: 20px 0; + padding: 1px; + border-radius: 8px; + background-image: linear-gradient(134.79deg, #A4F7DF 0%, #A0CEFB 21%, #5F9AFE 43%, #D9B9FC 62%, #01EFBB 73%, #FBAE46 100%); +} + +.info { + padding: 10px 20px; + border-radius: 8px; + background-color: #ffffff; + img { + width: 24px; + height: 24px; + } + ul { + list-style: disc; + padding-left: 18px; + line-height: 22px; + } +} \ No newline at end of file diff --git a/src/views/Jyh/Version/Detail/Dependency.vue b/src/views/Jyh/Version/Detail/Dependency.vue new file mode 100644 index 0000000..d98ddfb --- /dev/null +++ b/src/views/Jyh/Version/Detail/Dependency.vue @@ -0,0 +1,254 @@ + + + + diff --git a/src/views/Jyh/Version/Detail/index.vue b/src/views/Jyh/Version/Detail/index.vue index 6bb4c15..864874e 100644 --- a/src/views/Jyh/Version/Detail/index.vue +++ b/src/views/Jyh/Version/Detail/index.vue @@ -46,6 +46,7 @@ + @@ -63,6 +64,7 @@ import VersionInfo from './VersionInfo.vue'; import SBOM from './SBOM.vue'; import AIRepair from '../../AIRepair/index.vue'; import LicenseInfo from '../../LicenseInfo/index.vue'; +import Dependence from './Dependency.vue' const { namespace } = getOrgInfo(); const route = useRoute(); // 获取路由对象 const avatarUrl = '/src/assets/imgs/jyh/工程首字母图标.png'; From ecdb6e92b9a7ca77cf963c8ebd5a5fa341b495b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=98=E6=B0=91=E5=BA=B7?= Date: Mon, 17 Mar 2025 19:25:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5Mock=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 8 ++++---- src/api/user/index.ts | 2 +- src/components/Header/Notice.vue | 4 +++- src/components/Header/UserAvatar.vue | 6 +++--- src/stores/user.ts | 2 +- src/utils/request.ts | 2 +- src/views/Jyh/PersonalCenter/index.vue | 6 ++++-- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/App.vue b/src/App.vue index 9d9d7f6..ee6f067 100644 --- a/src/App.vue +++ b/src/App.vue @@ -126,10 +126,10 @@ onMounted(() => { } }); /** 获取用户组织配额权限 */ - if (!localStorage.getItem('group_quota')) { - const { getUserCreateOrg } = getOrgInfo(); - getUserCreateOrg(); - } + // if (!localStorage.getItem('group_quota')) { + // const { getUserCreateOrg } = getOrgInfo(); + // getUserCreateOrg(); + // } checkoutFirstTime(); }); diff --git a/src/api/user/index.ts b/src/api/user/index.ts index 0d7104c..4472024 100644 --- a/src/api/user/index.ts +++ b/src/api/user/index.ts @@ -689,7 +689,7 @@ export function getUserToken(): catchRt { // 获取用户信息 export function getUserInfo(): catchRt { return reqCatchV2(() => request({ - url: '/api/v1/user/oauth/userInfo', + url: '/api/v1/user/info', method: 'get' }, { customError: true diff --git a/src/components/Header/Notice.vue b/src/components/Header/Notice.vue index 925ecd3..d40009e 100644 --- a/src/components/Header/Notice.vue +++ b/src/components/Header/Notice.vue @@ -1,6 +1,6 @@