给批量检验添加新路由或者参数,便于从首页直接进入

This commit is contained in:
付民康
2025-03-16 09:41:54 +08:00
parent 80bc8301f1
commit c69df87ce6
4 changed files with 41 additions and 19 deletions

View File

@@ -54,7 +54,7 @@
</d-dropdown-menu>
<d-button color="primary" variant="solid" @click="search">搜索</d-button>
</div>
<d-button 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="info-title">
<div class="sub-title">
@@ -136,6 +136,13 @@ const openAdvancedSearch = () => {
inputGlow.value = isOpen.value;
};
const check = () => {
router.push({
name: 'Search',
query: { tab: 'BatchVerify' }, // 通过查询参数指定 Tab
});
}
const closeOutside = () => {
return false
}

View File

@@ -20,7 +20,7 @@
<div class="tjsj">
<span style="height: 14px" class="split"></span>
<span>可使用</span>
<span class="blue">3</span>
<span class="green">3</span>
<span style="height: 14px" class="split"></span>
<span>未治理</span>
<span class="yellow">3</span>

View File

@@ -19,7 +19,7 @@
<script setup lang="ts">
import SettingTitle from '@/components/Setting/SettingTitle/index.vue';
import SettingText from '@/components/Setting/SettingText/index.vue';
import { ref,reactive } from 'vue';
import { ref,reactive,watch } from 'vue';
import { getGroupClaList, setGroupClaStatus, deleteGroupCla } from '@/api/cla';
import { useRouter, useRoute } from 'vue-router';
import { GModal } from '@/components/Setting/index';
@@ -30,7 +30,22 @@ import OssQuery from './Components/OssQuery.vue';
import BatchVerify from './Components/BatchVerify.vue';
const { namespace } = getOrgInfo();
const selectTab = ref('OssQuery');
// 获取当前路由
const route = useRoute();
const selectTab = ref(route.query.tab || 'OssQuery');
// 监听路由变化,更新 Tab
watch(
() => route.query.tab,
(newTab) => {
if (newTab) {
selectTab.value = newTab;
}
}
);
// 删除弹窗
const item = ref('');

View File

@@ -97,12 +97,12 @@
<d-column field="detail" header="应用场景"></d-column>
</d-table>
</div>
<!-- <d-row>-->
<!-- <d-col :span="24">-->
<!-- <span class="card-key width-140">主License分析报告</span>-->
<!-- <a class="card-url" href="https://designcloud.uiplus.huawei.com/developer/main/index.html">https://designcloud.uiplus.huawei.com/developer/main/index.html</a>-->
<!-- </d-col>-->
<!-- </d-row>-->
<d-row>
<d-col :span="24">
<span class="card-key width-140">主License分析报告</span>
<a class="card-url" href="https://designcloud.uiplus.huawei.com/developer/main/index.html">https://designcloud.uiplus.huawei.com/developer/main/index.html</a>
</d-col>
</d-row>
</Card>
<Card simple class="jyh-card mb-4">
<div class="card-title">Copyright报告</div>
@@ -116,12 +116,12 @@
<d-column field="detail" header="录入时间"></d-column>
</d-table>
</div>
<d-row>
<d-col :span="24">
<span class="card-key width-140">主License分析报告</span>
<a class="card-url" href="https://designcloud.uiplus.huawei.com/developer/main/index.html">https://designcloud.uiplus.huawei.com/developer/main/index.html</a>
</d-col>
</d-row>
<!-- <d-row>-->
<!-- <d-col :span="24">-->
<!-- <span class="card-key width-140">主License分析报告</span>-->
<!-- <a class="card-url" href="https://designcloud.uiplus.huawei.com/developer/main/index.html">https://designcloud.uiplus.huawei.com/developer/main/index.html</a>-->
<!-- </d-col>-->
<!-- </d-row>-->
</Card>
<Card simple class="jyh-card mb-4">