|
192 | 192 | </div> |
193 | 193 | <div class="split-line"></div> |
194 | 194 | </template> |
195 | | - |
| 195 | + <div class="url-list"> |
| 196 | + <UrlComponent |
| 197 | + v-for="(url, index) in urls" |
| 198 | + :key="index" |
| 199 | + :url="url" |
| 200 | + ></UrlComponent> |
| 201 | + <div class="pagination-box"> |
| 202 | + <el-pagination |
| 203 | + :current-page="headerPage" |
| 204 | + background |
| 205 | + :page-sizes="[10, 20, 50, 100]" |
| 206 | + :page-size="headerPageSize" |
| 207 | + layout=" prev, pager, next, jumper, sizes, total" |
| 208 | + :total="total" |
| 209 | + @size-change="handleSizeChange" |
| 210 | + @current-change="handleCurrentChange" |
| 211 | + > |
| 212 | + </el-pagination> |
| 213 | + </div> |
| 214 | + </div> |
196 | 215 | <!-- Stain flow vul--> |
197 | 216 | <div v-if="vulnObj.graphs.length" class="module-title">污点流图</div> |
198 | 217 | <div v-if="vulnObj.graphs.length"> |
@@ -293,13 +312,16 @@ import qs from 'qs' |
293 | 312 | import LinkList from './components/linkList.vue' |
294 | 313 | import StacksList from './components/stacksList.vue' |
295 | 314 | import Sync from './components/sync.vue' |
| 315 | +import UrlComponent from './components/urlComponent.vue' |
| 316 | +import emitter from '../taint/Emitter' |
296 | 317 |
|
297 | 318 | @Component({ |
298 | 319 | name: 'VulnDetail', |
299 | 320 | components: { |
300 | 321 | LinkList, |
301 | 322 | StacksList, |
302 | 323 | Sync, |
| 324 | + UrlComponent, |
303 | 325 | }, |
304 | 326 | }) |
305 | 327 | export default class VulnDetail extends VueBase { |
@@ -461,14 +483,20 @@ export default class VulnDetail extends VueBase { |
461 | 483 | this.cardIndex = 0 |
462 | 484 | await this.getStatus() |
463 | 485 | await this.getVulnDetail() |
| 486 | + await this.getUrls() |
464 | 487 | this.syncInfo = { |
465 | 488 | id: this.$route.params.id, |
466 | 489 | } |
467 | 490 | } |
468 | 491 | async created() { |
| 492 | + emitter.on('getUrls', this.getUrls) |
469 | 493 | this.init() |
470 | 494 | } |
471 | 495 |
|
| 496 | + async beforeDestroy() { |
| 497 | + emitter.off('getUrls', this.getUrls) |
| 498 | + } |
| 499 | +
|
472 | 500 | private goToPoolDetail() { |
473 | 501 | if (this.vulnObj.vul.method_pool_id) { |
474 | 502 | const { href } = this.$router.resolve({ |
@@ -913,6 +941,33 @@ export default class VulnDetail extends VueBase { |
913 | 941 | return className |
914 | 942 | } |
915 | 943 |
|
| 944 | + private urls: any = [] |
| 945 | + private headerPage = 1 |
| 946 | + private headerPageSize = 10 |
| 947 | + async getUrls() { |
| 948 | + const res = await this.services.vuln.getHeaderVul({ |
| 949 | + page: this.headerPage, |
| 950 | + page_size: this.headerPageSize, |
| 951 | + vul_id: this.selectedId, |
| 952 | + }) |
| 953 | + if (res.status === 201) { |
| 954 | + this.urls = res.data |
| 955 | + this.total = res.page.alltotal |
| 956 | + } else { |
| 957 | + this.$message.error(res.msg) |
| 958 | + } |
| 959 | + } |
| 960 | +
|
| 961 | + handleSizeChange(val: number) { |
| 962 | + this.headerPageSize = val |
| 963 | + this.getUrls() |
| 964 | + } |
| 965 | +
|
| 966 | + handleCurrentChange(val: number) { |
| 967 | + this.headerPage = val |
| 968 | + this.getUrls() |
| 969 | + } |
| 970 | +
|
916 | 971 | // exportVul() { |
917 | 972 | // var projectName = this.vulnObj.vul.project_name |
918 | 973 | // request |
@@ -990,6 +1045,12 @@ export default class VulnDetail extends VueBase { |
990 | 1045 | font-size: 14px; |
991 | 1046 | } |
992 | 1047 |
|
| 1048 | +.pagination-box { |
| 1049 | + padding-top: 12px; |
| 1050 | + display: flex; |
| 1051 | + justify-content: flex-end; |
| 1052 | +} |
| 1053 | +
|
993 | 1054 | .fixed-warp { |
994 | 1055 | position: fixed; |
995 | 1056 | top: 0; |
@@ -1121,7 +1182,7 @@ export default class VulnDetail extends VueBase { |
1121 | 1182 | border: 1px solid #e6e9ec; |
1122 | 1183 | border-radius: 2px; |
1123 | 1184 | background: #fff; |
1124 | | - ::v-deeptt { |
| 1185 | + ::v-deep(tt) { |
1125 | 1186 | color: red !important; |
1126 | 1187 | font-style: normal !important; |
1127 | 1188 | } |
|
0 commit comments