2025-03-13 16:09:33 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="secret-container">
|
|
|
|
|
|
<div class="search-form">
|
2025-03-24 16:58:33 +08:00
|
|
|
|
<d-form layout="horizontal" :label-align="'end'">
|
2025-03-20 20:51:16 +08:00
|
|
|
|
<d-row :gutter="16">
|
|
|
|
|
|
<d-col :span="8">
|
|
|
|
|
|
<d-form-item field="name" label="软件名称">
|
|
|
|
|
|
<d-input placeholder="请输入软件名称" v-model="newFormData.softwareName" />
|
|
|
|
|
|
</d-form-item>
|
|
|
|
|
|
</d-col>
|
|
|
|
|
|
<d-col :span="8">
|
|
|
|
|
|
<d-form-item field="version" label="软件版本">
|
|
|
|
|
|
<d-input placeholder="请输入软件版本" v-model="newFormData.softwareVersion" />
|
|
|
|
|
|
</d-form-item>
|
|
|
|
|
|
</d-col>
|
|
|
|
|
|
<d-col :span="8">
|
|
|
|
|
|
<d-form-item field="language" label="编程语言">
|
|
|
|
|
|
<d-select
|
|
|
|
|
|
:options="languageList"
|
|
|
|
|
|
:allow-clear="true"
|
|
|
|
|
|
v-model="newFormData.programmingLanguage"
|
|
|
|
|
|
placeholder="请选择编程语言"
|
|
|
|
|
|
></d-select>
|
|
|
|
|
|
</d-form-item>
|
|
|
|
|
|
</d-col>
|
2025-06-12 18:03:46 +08:00
|
|
|
|
<!-- <d-col :span="8">-->
|
|
|
|
|
|
<!-- <d-form-item field="license" label="license">-->
|
|
|
|
|
|
<!-- <d-input placeholder="请输入license名称" v-model="newFormData.licenseName" />-->
|
|
|
|
|
|
<!-- </d-form-item>-->
|
|
|
|
|
|
<!-- </d-col>-->
|
|
|
|
|
|
</d-row>
|
|
|
|
|
|
<d-row :gutter="16">
|
|
|
|
|
|
<!-- <d-col :span="8">-->
|
|
|
|
|
|
<!-- <d-form-item field="dependency" label="依赖软件名称">-->
|
|
|
|
|
|
<!-- <d-input placeholder="请输入依赖软件名称" v-model="newFormData.dependentSoftware" />-->
|
|
|
|
|
|
<!-- </d-form-item>-->
|
|
|
|
|
|
<!-- </d-col>-->
|
2025-03-20 20:51:16 +08:00
|
|
|
|
<d-col :span="8">
|
|
|
|
|
|
<d-form-item field="date" label="版本发布日期">
|
|
|
|
|
|
<d-range-date-picker-pro
|
|
|
|
|
|
v-model="newFormData.dateRange"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
:placeholder="['开始日期', '结束日期']"
|
2025-03-25 17:02:21 +08:00
|
|
|
|
:limitDateRange="limitDateRange"
|
2025-03-20 20:51:16 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</d-form-item>
|
|
|
|
|
|
</d-col>
|
|
|
|
|
|
<d-col :span="8">
|
|
|
|
|
|
<d-form-item field="industry" label="行业">
|
|
|
|
|
|
<d-select
|
|
|
|
|
|
:key="newFormData.industry"
|
|
|
|
|
|
:options="industryList"
|
|
|
|
|
|
:allow-clear="true"
|
|
|
|
|
|
v-model="newFormData.industry"
|
|
|
|
|
|
placeholder="请选择行业"
|
|
|
|
|
|
></d-select>
|
|
|
|
|
|
</d-form-item>
|
|
|
|
|
|
</d-col>
|
|
|
|
|
|
</d-row>
|
2025-06-12 18:03:46 +08:00
|
|
|
|
<!-- <d-row :gutter="16">-->
|
|
|
|
|
|
<!--<!– <d-col :span="8">–>-->
|
|
|
|
|
|
<!--<!– <d-form-item field="interestTag" label="属性标签">–>-->
|
|
|
|
|
|
<!--<!– <d-input placeholder="请输入属性标签" v-model="newFormData.interestTag" />–>-->
|
|
|
|
|
|
<!--<!– </d-form-item>–>-->
|
|
|
|
|
|
<!--<!– </d-col>–>-->
|
|
|
|
|
|
<!-- <d-col :span="8">-->
|
|
|
|
|
|
<!-- <d-form-item field="industry" label="行业">-->
|
|
|
|
|
|
<!-- <d-select-->
|
|
|
|
|
|
<!-- :key="newFormData.industry"-->
|
|
|
|
|
|
<!-- :options="industryList"-->
|
|
|
|
|
|
<!-- :allow-clear="true"-->
|
|
|
|
|
|
<!-- v-model="newFormData.industry"-->
|
|
|
|
|
|
<!-- placeholder="请选择行业"-->
|
|
|
|
|
|
<!-- ></d-select>-->
|
|
|
|
|
|
<!-- </d-form-item>-->
|
|
|
|
|
|
<!-- </d-col>-->
|
|
|
|
|
|
<!-- </d-row>-->
|
2025-03-20 20:51:16 +08:00
|
|
|
|
</d-form>
|
2025-03-19 09:37:41 +08:00
|
|
|
|
<div class="jyh-form-operation">
|
|
|
|
|
|
<d-button @click="getReleaseList" class="mr-2" variant="solid">搜索</d-button>
|
2025-03-19 19:38:32 +08:00
|
|
|
|
<d-button variant="solid" color="secondary" @click="clear">清空</d-button>
|
2025-03-19 09:37:41 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="left-btn">
|
2025-03-24 16:58:33 +08:00
|
|
|
|
<d-button v-if="isLogin" class="output-btn" icon="icon-share" variant="text" @click="exportResult"
|
|
|
|
|
|
>导出</d-button
|
|
|
|
|
|
>
|
2025-03-19 09:37:41 +08:00
|
|
|
|
<span v-if="isLogin" style="height: 14px" class="split"></span>
|
2025-03-24 16:58:33 +08:00
|
|
|
|
<TableSetting
|
|
|
|
|
|
:columns="columns"
|
|
|
|
|
|
@setDefult="setDefult"
|
2025-03-27 15:09:52 +08:00
|
|
|
|
@updateTableKey="updateTableKey"
|
2025-03-24 16:58:33 +08:00
|
|
|
|
:show-column-list="showColumnList"
|
|
|
|
|
|
@update:show-column-list="updateShowColumnList"
|
|
|
|
|
|
/>
|
2025-03-19 09:37:41 +08:00
|
|
|
|
</div>
|
2025-03-13 16:09:33 +08:00
|
|
|
|
</div>
|
2025-03-19 09:37:41 +08:00
|
|
|
|
<div class="mt-3 px-20">
|
2025-03-24 16:58:33 +08:00
|
|
|
|
<d-table
|
|
|
|
|
|
:key="tableKey"
|
|
|
|
|
|
ref="filterTableRef"
|
|
|
|
|
|
class="jyh-table"
|
|
|
|
|
|
v-if="tableData.length"
|
|
|
|
|
|
:striped="false"
|
|
|
|
|
|
:data="tableData"
|
|
|
|
|
|
>
|
|
|
|
|
|
<d-column type="checkable" width="40" reserve-check align="center"></d-column>
|
2025-03-15 20:32:13 +08:00
|
|
|
|
<!-- 索引列 -->
|
2025-03-24 16:58:33 +08:00
|
|
|
|
<!-- <d-column type="index" width="40"></d-column> -->
|
2025-03-15 20:32:13 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 动态渲染列 -->
|
|
|
|
|
|
<template v-for="column in columns" :key="column.key">
|
2025-07-05 15:49:34 +08:00
|
|
|
|
<d-column v-if="column.visible" :field="column.key" :header="column.label" :width="column.width||120" :show-overflow-tooltip="!column.tooltip">
|
2025-03-15 20:32:13 +08:00
|
|
|
|
<!-- 自定义列内容 -->
|
|
|
|
|
|
<template #default="scope">
|
2025-06-26 11:14:26 +08:00
|
|
|
|
<template v-if="column.key === 'softwareName'">
|
|
|
|
|
|
<a @click="gotoDetail(scope.row)">{{ scope.row.softwareName }}</a>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="column.key === 'versionName'">
|
2025-03-20 17:48:12 +08:00
|
|
|
|
<a @click="gotoDetail(scope.row)">{{ scope.row.versionName }}</a>
|
2025-03-15 20:32:13 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="column.key === 'version'">
|
|
|
|
|
|
<a @click="gotoDetail(scope.row)">{{ scope.row.version }}</a>
|
|
|
|
|
|
</template>
|
2025-04-16 14:36:41 +08:00
|
|
|
|
<template v-else-if="column.key === 'securityScore'">
|
2025-06-26 11:14:26 +08:00
|
|
|
|
<!-- <a @click="gotoDetail(scope.row)" style="-->
|
|
|
|
|
|
<a style="
|
2025-04-16 14:57:11 +08:00
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
color: #409EFF;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
">{{ scope.row.securityScore }}</a>
|
2025-04-16 14:36:41 +08:00
|
|
|
|
</template>
|
2025-07-05 15:49:34 +08:00
|
|
|
|
<template v-else-if="column.key === 'trustScore'">
|
|
|
|
|
|
<d-popover :content="scope.row.trustScore || '--'" trigger="hover" style="background-color: #7693f5; color: #fff">
|
|
|
|
|
|
<d-tag color="#ef4444">{{ '非常重要' || '--' }}</d-tag>
|
|
|
|
|
|
</d-popover>
|
|
|
|
|
|
</template>
|
2025-03-18 17:43:51 +08:00
|
|
|
|
<template v-else-if="column.key === 'releaseDate'">
|
2025-03-27 11:09:31 +08:00
|
|
|
|
<span>{{ formatTime(scope.row.releaseDate, 'YYYY-MM-DD') }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="column.key === 'eolDate'">
|
|
|
|
|
|
<span>{{ formatTime(scope.row.eolDate, 'YYYY-MM-DD') }}</span>
|
2025-03-18 17:43:51 +08:00
|
|
|
|
</template>
|
2025-03-15 20:32:13 +08:00
|
|
|
|
<template v-else-if="column.key === 'softwareVersion'">
|
|
|
|
|
|
<a @click="gotoDetail(scope.row)">{{ scope.row.softwareVersion }}</a>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="column.key === 'smStatus'">
|
|
|
|
|
|
<a>{{ scope.row.smStatus }}</a>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="column.key === 'industryCategory'">
|
2025-03-20 20:51:16 +08:00
|
|
|
|
<d-tag type="success">{{ getIndustryName(scope.row.industryCategory) }}</d-tag>
|
2025-03-15 20:32:13 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="column.key === 'programmingLanguage'">
|
|
|
|
|
|
<d-tag type="success">{{ scope.row.programmingLanguage }}</d-tag>
|
|
|
|
|
|
</template>
|
2025-04-22 14:52:34 +08:00
|
|
|
|
<template v-else-if="column.key === 'primaryLanguage'">
|
|
|
|
|
|
<d-tag type="primary">{{ scope.row.primaryLanguage }}</d-tag>
|
|
|
|
|
|
</template>
|
2025-03-15 20:32:13 +08:00
|
|
|
|
<template v-else-if="column.key === 'contributorCountries'">
|
2025-03-27 14:59:39 +08:00
|
|
|
|
<!-- <div style="cursor: pointer" @click="openCountryModal(column)">-->
|
|
|
|
|
|
<!-- <span class="mr-2">美国 3.57%</span>-->
|
|
|
|
|
|
<!-- <d-tag color="gray">+3</d-tag>-->
|
|
|
|
|
|
<!-- </div>-->
|
2025-03-15 20:32:13 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="column.key === 'contributorOrganizations'">
|
2025-03-27 14:59:39 +08:00
|
|
|
|
<!-- <div style="cursor: pointer" @click="openOrgModal(column)">-->
|
|
|
|
|
|
<!-- <span class="mr-2">microsoft 3.57%</span>-->
|
|
|
|
|
|
<!-- <d-tag color="gray">+3</d-tag>-->
|
|
|
|
|
|
<!-- </div>-->
|
2025-03-15 20:32:13 +08:00
|
|
|
|
</template>
|
2025-03-18 17:43:51 +08:00
|
|
|
|
<template v-else-if="column.key === 'sourceDownloadUrl'">
|
2025-03-20 23:22:22 +08:00
|
|
|
|
<a :href="scope.row.sourceDownloadUrl">{{ scope.row.sourceDownloadUrl }}</a>
|
2025-03-15 20:32:13 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else>
|
|
|
|
|
|
{{ scope.row[column.key] }}
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</d-column>
|
|
|
|
|
|
</template>
|
2025-03-13 16:09:33 +08:00
|
|
|
|
</d-table>
|
|
|
|
|
|
|
2025-03-24 16:58:33 +08:00
|
|
|
|
<!-- <DataPanel v-else skeleton :card="false" :empty="true">-->
|
|
|
|
|
|
<!-- </DataPanel>-->
|
2025-03-19 10:44:39 +08:00
|
|
|
|
<NoData v-else :small="false"></NoData>
|
2025-03-13 16:09:33 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mt-20 mb-20 flex justify-end">
|
2025-03-24 16:58:33 +08:00
|
|
|
|
<d-pagination
|
|
|
|
|
|
size="md"
|
|
|
|
|
|
:page-size-options="[10, 20, 50]"
|
|
|
|
|
|
:total="pager.total"
|
|
|
|
|
|
v-model:pageSize="pager.pageSize"
|
|
|
|
|
|
v-model:pageIndex="pager.pageIndex"
|
|
|
|
|
|
:max-items="5"
|
|
|
|
|
|
:can-change-page-size="true"
|
|
|
|
|
|
:can-view-total="true"
|
|
|
|
|
|
total-item-text="总计"
|
|
|
|
|
|
@page-index-change="getReleaseList()"
|
|
|
|
|
|
@page-size-change="getReleaseList()"
|
|
|
|
|
|
/>
|
2025-03-13 16:09:33 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 删除组件 -->
|
2025-03-24 16:58:33 +08:00
|
|
|
|
<GModal
|
|
|
|
|
|
v-model="deletevModels"
|
|
|
|
|
|
ref="deleteModal"
|
|
|
|
|
|
title="删除?"
|
|
|
|
|
|
@confirm="confirmDelete"
|
|
|
|
|
|
showWarnIcon
|
|
|
|
|
|
confirmColor="danger"
|
|
|
|
|
|
>
|
|
|
|
|
|
<span class="inline-block text-G900 text-sm font-normal leading-[20px] break-all"
|
|
|
|
|
|
>你确认删除此项:{{ item.cla_name }} ?</span
|
|
|
|
|
|
>
|
2025-03-13 16:09:33 +08:00
|
|
|
|
</GModal>
|
2025-03-18 16:07:53 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 引入子组件 -->
|
|
|
|
|
|
<CountryModal ref="countryModalRef" />
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 引入子组件 -->
|
|
|
|
|
|
<OrgModal ref="orgModalRef" />
|
2025-03-13 16:09:33 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2025-03-24 16:58:33 +08:00
|
|
|
|
import AdvanceSearch from '@/components/AdvanceSearch/index.vue';
|
2025-03-13 16:09:33 +08:00
|
|
|
|
import SettingTitle from '@/components/Setting/SettingTitle/index.vue';
|
|
|
|
|
|
import SettingText from '@/components/Setting/SettingText/index.vue';
|
2025-03-20 20:51:16 +08:00
|
|
|
|
import { ref, reactive, onMounted, watch, nextTick } from 'vue';
|
2025-03-13 16:09:33 +08:00
|
|
|
|
import { getGroupClaList, setGroupClaStatus, deleteGroupCla } from '@/api/cla';
|
|
|
|
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
|
|
|
|
import { GModal } from '@/components/Setting/index';
|
2025-03-15 17:58:49 +08:00
|
|
|
|
import TableSetting from '@/components/TableSetting/index.vue';
|
2025-03-13 16:09:33 +08:00
|
|
|
|
import { reqCatch } from '@/utils/catch';
|
|
|
|
|
|
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
|
|
|
|
|
|
import { Message } from 'vue-devui';
|
2025-03-15 20:32:13 +08:00
|
|
|
|
import { storeToRefs } from 'pinia';
|
2025-03-24 16:58:33 +08:00
|
|
|
|
import CountryModal from './CountryModal.vue';
|
|
|
|
|
|
import OrgModal from './OrgModal.vue';
|
2025-03-19 16:20:20 +08:00
|
|
|
|
import NoData from '@/components/NoData/NoData.vue';
|
2025-03-15 20:32:13 +08:00
|
|
|
|
import { useAccountStore } from '@/stores/user';
|
2025-03-24 16:58:33 +08:00
|
|
|
|
import * as XLSX from 'xlsx';
|
2025-03-18 17:43:51 +08:00
|
|
|
|
const { formatTime } = useTimeFormat();
|
2025-03-26 10:14:40 +08:00
|
|
|
|
import { getReleaseExport, releasePage, searchLanguageList } from '@/api/jyh';
|
2025-03-18 17:43:51 +08:00
|
|
|
|
import { useTimeFormat } from '@/utils/hooks/useTimeFormat';
|
2025-03-19 19:38:32 +08:00
|
|
|
|
import { useGlobalInfoStore } from '@/stores/Global';
|
2025-03-20 20:51:16 +08:00
|
|
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
|
|
2025-03-24 16:58:33 +08:00
|
|
|
|
const filterTableRef = ref();
|
2025-03-13 16:09:33 +08:00
|
|
|
|
const { namespace } = getOrgInfo();
|
2025-03-15 20:32:13 +08:00
|
|
|
|
const userInfo = useAccountStore();
|
|
|
|
|
|
const { isLogin } = storeToRefs(userInfo);
|
|
|
|
|
|
// 定义 tableKey,用于强制刷新表格
|
|
|
|
|
|
const tableKey = ref(0);
|
2025-03-18 16:07:53 +08:00
|
|
|
|
const countryVisible = ref(false);
|
|
|
|
|
|
const orgVisible = ref(false);
|
2025-03-20 20:57:05 +08:00
|
|
|
|
const allTableData = ref([]);
|
2025-03-18 17:43:51 +08:00
|
|
|
|
const tableData = ref([]);
|
2025-06-13 18:01:31 +08:00
|
|
|
|
// const languageList = ref([]);
|
2025-03-19 19:38:32 +08:00
|
|
|
|
const globalInfo = useGlobalInfoStore();
|
2025-06-13 18:01:31 +08:00
|
|
|
|
const languageList = globalInfo.languageList;
|
2025-03-24 16:58:33 +08:00
|
|
|
|
const headerSearch = ref(globalInfo.headerSearch);
|
2025-03-20 20:51:16 +08:00
|
|
|
|
const industryList = ref(globalInfo.industryList);
|
2025-03-15 17:02:06 +08:00
|
|
|
|
const newFormData = ref({
|
2025-03-19 09:37:41 +08:00
|
|
|
|
licenseName: '',
|
2025-03-20 20:51:16 +08:00
|
|
|
|
searchType: 'software',
|
2025-03-19 20:47:53 +08:00
|
|
|
|
softwareName: '',
|
2025-03-19 09:37:41 +08:00
|
|
|
|
softwareVersion: '',
|
2025-03-15 17:02:06 +08:00
|
|
|
|
dependentSoftware: '',
|
|
|
|
|
|
programmingLanguage: '',
|
2025-03-19 19:38:32 +08:00
|
|
|
|
interestTag: '',
|
|
|
|
|
|
industry: '',
|
2025-03-15 17:02:06 +08:00
|
|
|
|
dateRange: ['', '']
|
2025-03-24 16:58:33 +08:00
|
|
|
|
});
|
2025-03-25 17:02:21 +08:00
|
|
|
|
const currentDate = new Date(); // 获取当前时间
|
|
|
|
|
|
const limitDateRange = ref<Date[]>([new Date(2000, 1, 1), currentDate]); // 结束日期设置为当前时间
|
2025-03-15 17:02:06 +08:00
|
|
|
|
|
2025-03-20 20:51:16 +08:00
|
|
|
|
// watch(() => globalInfo.headerSearch, (newVal: any) => {
|
|
|
|
|
|
// headerSearch.value = newVal;
|
|
|
|
|
|
// console.log(newVal)
|
|
|
|
|
|
// newFormData.value.searchType = newVal.searchType;
|
|
|
|
|
|
// newFormData.value.softwareName = newVal.softwareName;
|
|
|
|
|
|
// getReleaseList();
|
|
|
|
|
|
// }, { deep: true })
|
2025-03-19 19:38:32 +08:00
|
|
|
|
|
2025-03-13 16:09:33 +08:00
|
|
|
|
const pager = ref({
|
|
|
|
|
|
total: 10,
|
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
|
pageSize: 10
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// 删除弹窗
|
|
|
|
|
|
const item = ref('');
|
|
|
|
|
|
const deleteModal = ref();
|
|
|
|
|
|
const deletevModels = ref(false);
|
|
|
|
|
|
const openDelete = (row: any) => {
|
|
|
|
|
|
item.value = row;
|
|
|
|
|
|
deleteModal.value.showFlag = true;
|
|
|
|
|
|
deletevModels.value = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-03-20 20:51:16 +08:00
|
|
|
|
const defultColumns = ref([
|
|
|
|
|
|
{ key: 'softwareName', label: '软件名称', visible: true, filterable: true, sortable: false },
|
|
|
|
|
|
{ key: 'softwareVersion', label: '软件版本', visible: true, filterable: true, sortable: false },
|
2025-07-05 15:49:34 +08:00
|
|
|
|
{ key: 'trustScore', label: '软件可信评分', visible: false, filterable: false, sortable: true, tooltip: true },
|
2025-06-25 15:40:29 +08:00
|
|
|
|
{ key: 'securityScore', label: '软件重要性评分', visible: true, filterable: false, sortable: true },
|
2025-04-22 17:56:04 +08:00
|
|
|
|
{ key: 'licenseNum', label: 'License数量', visible: true, filterable: false, sortable: false,width: 140 },
|
2025-03-20 20:51:16 +08:00
|
|
|
|
{ key: 'industryCategory', label: '行业类型', visible: true, filterable: true, sortable: false },
|
|
|
|
|
|
{ key: 'primaryLanguage', label: '编程语言', visible: true, filterable: true, sortable: false },
|
|
|
|
|
|
{ key: 'codeLines', label: '代码量', visible: true, filterable: false, sortable: false },
|
2025-04-21 17:47:08 +08:00
|
|
|
|
{ key: 'sourceDownloadUrl', label: '源码包下载地址', visible: true, filterable: false, sortable: false,width: 200 },
|
|
|
|
|
|
{ key: 'releaseDate', label: '版本发布时间', visible: false, filterable: true, sortable: true,width: 160 },
|
|
|
|
|
|
// { key: 'dependencyCount', label: '依赖软件数', visible: false, filterable: false, sortable: false },
|
|
|
|
|
|
// { key: 'productComponentUsage', label: '产品成分使用量', visible: false, filterable: false, sortable: false,width: 160 },
|
2025-03-20 20:51:16 +08:00
|
|
|
|
{ key: 'vulnerabilityCount', label: '漏洞数量', visible: false, filterable: false, sortable: false },
|
2025-04-22 16:24:34 +08:00
|
|
|
|
{ key: 'developer', label: '开发商', visible: false, filterable: true, sortable: false },
|
2025-04-21 17:47:08 +08:00
|
|
|
|
{ key: 'contributorCountries', label: '贡献者国家/地区分布', visible: false, filterable: false, sortable: false,width: 200 },
|
|
|
|
|
|
{ key: 'contributorOrganizations', label: '贡献者组织/公司分布', visible: false, filterable: false, sortable: false,width: 200 },
|
|
|
|
|
|
{ key: 'communityHash', label: '社区hash值', visible: false, filterable: false, sortable: false,width: 160 },
|
2025-03-20 20:51:16 +08:00
|
|
|
|
{ key: 'copyright', label: 'Copyright', visible: false, filterable: false, sortable: false },
|
2025-03-24 16:58:33 +08:00
|
|
|
|
{
|
|
|
|
|
|
key: 'externalVulnerabilitySource',
|
|
|
|
|
|
label: '外部漏洞源的软件名称',
|
|
|
|
|
|
visible: false,
|
|
|
|
|
|
filterable: true,
|
2025-04-21 17:47:08 +08:00
|
|
|
|
sortable: false,width: 200
|
2025-03-24 16:58:33 +08:00
|
|
|
|
},
|
2025-03-20 20:51:16 +08:00
|
|
|
|
{ key: 'versionDescription', label: '版本描述', visible: false, filterable: false, sortable: false },
|
2025-04-21 17:47:08 +08:00
|
|
|
|
{ key: 'compatibilityRisk', label: '兼容性风险描述', visible: false, filterable: false, sortable: false ,width: 160},
|
|
|
|
|
|
{ key: 'eolDate', label: '社区EOL时间', visible: false, filterable: true, sortable: true,width: 160 }
|
2025-03-20 20:51:16 +08:00
|
|
|
|
]);
|
2025-03-15 20:32:13 +08:00
|
|
|
|
// 定义 columns 数据
|
|
|
|
|
|
const columns = ref([
|
|
|
|
|
|
{ key: 'softwareName', label: '软件名称', visible: true, filterable: true, sortable: false },
|
|
|
|
|
|
{ key: 'softwareVersion', label: '软件版本', visible: true, filterable: true, sortable: false },
|
2025-07-05 15:49:34 +08:00
|
|
|
|
{ key: 'trustScore', label: '软件可信评分', visible: false, filterable: false, sortable: true, tooltip: true },
|
2025-06-25 15:40:29 +08:00
|
|
|
|
{ key: 'securityScore', label: '软件重要性评分', visible: true, filterable: false, sortable: true },
|
2025-04-22 17:56:04 +08:00
|
|
|
|
{ key: 'licenseNum', label: 'License数量', visible: true, filterable: false, sortable: false,width: 140 },
|
2025-03-18 18:02:02 +08:00
|
|
|
|
{ key: 'industryCategory', label: '行业类型', visible: true, filterable: true, sortable: false },
|
|
|
|
|
|
{ key: 'primaryLanguage', label: '编程语言', visible: true, filterable: true, sortable: false },
|
2025-03-18 17:43:51 +08:00
|
|
|
|
{ key: 'codeLines', label: '代码量', visible: true, filterable: false, sortable: false },
|
2025-04-21 17:47:08 +08:00
|
|
|
|
{ key: 'sourceDownloadUrl', label: '源码包下载地址', visible: true, filterable: false, sortable: false,width: 200 },
|
|
|
|
|
|
{ key: 'releaseDate', label: '版本发布时间', visible: false, filterable: true, sortable: true,width: 160 },
|
|
|
|
|
|
// { key: 'dependencyCount', label: '依赖软件数', visible: false, filterable: false, sortable: false },
|
|
|
|
|
|
// { key: 'productComponentUsage', label: '产品成分使用量', visible: false, filterable: false, sortable: false,width: 160 },
|
2025-03-18 18:02:02 +08:00
|
|
|
|
{ key: 'vulnerabilityCount', label: '漏洞数量', visible: false, filterable: false, sortable: false },
|
2025-04-22 16:24:34 +08:00
|
|
|
|
{ key: 'developer', label: '开发商', visible: false, filterable: true, sortable: false },
|
2025-04-21 17:47:08 +08:00
|
|
|
|
{ key: 'contributorCountries', label: '贡献者国家/地区分布', visible: false, filterable: false, sortable: false,width: 200 },
|
|
|
|
|
|
{ key: 'contributorOrganizations', label: '贡献者组织/公司分布', visible: false, filterable: false, sortable: false,width: 200 },
|
|
|
|
|
|
{ key: 'communityHash', label: '社区hash值', visible: false, filterable: false, sortable: false,width: 160 },
|
2025-03-19 12:51:49 +08:00
|
|
|
|
{ key: 'copyright', label: 'Copyright', visible: false, filterable: false, sortable: false },
|
2025-03-24 16:58:33 +08:00
|
|
|
|
{
|
|
|
|
|
|
key: 'externalVulnerabilitySource',
|
|
|
|
|
|
label: '外部漏洞源的软件名称',
|
|
|
|
|
|
visible: false,
|
|
|
|
|
|
filterable: true,
|
2025-04-21 17:47:08 +08:00
|
|
|
|
sortable: false,width: 200
|
2025-03-24 16:58:33 +08:00
|
|
|
|
},
|
2025-03-15 20:32:13 +08:00
|
|
|
|
{ key: 'versionDescription', label: '版本描述', visible: false, filterable: false, sortable: false },
|
2025-04-21 17:47:08 +08:00
|
|
|
|
{ key: 'compatibilityRisk', label: '兼容性风险描述', visible: false, filterable: false, sortable: false ,width: 160},
|
|
|
|
|
|
{ key: 'eolDate', label: '社区EOL时间', visible: false, filterable: true, sortable: true,width: 160 }
|
2025-03-15 20:32:13 +08:00
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
// 定义 showColumnList 状态
|
|
|
|
|
|
const showColumnList = ref(false);
|
2025-03-18 16:07:53 +08:00
|
|
|
|
// 获取子组件的引用
|
|
|
|
|
|
const countryModalRef = ref(null);
|
|
|
|
|
|
const orgModalRef = ref(null);
|
2025-03-15 20:32:13 +08:00
|
|
|
|
|
2025-03-20 20:51:16 +08:00
|
|
|
|
const getIndustryName = (value) => {
|
2025-03-24 16:58:33 +08:00
|
|
|
|
const industry = industryList.value.find((item) => item.value === value);
|
2025-03-20 20:51:16 +08:00
|
|
|
|
return industry ? industry.name : '未知行业'; // 如果找不到,返回默认值
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-03-19 19:38:32 +08:00
|
|
|
|
// 清空高级搜索
|
|
|
|
|
|
const clear = () => {
|
|
|
|
|
|
newFormData.value = {
|
|
|
|
|
|
licenseName: '',
|
2025-03-20 20:51:16 +08:00
|
|
|
|
searchType: 'software',
|
2025-03-19 20:47:53 +08:00
|
|
|
|
softwareName: '',
|
2025-03-19 19:38:32 +08:00
|
|
|
|
softwareVersion: '',
|
|
|
|
|
|
dependentSoftware: '',
|
|
|
|
|
|
programmingLanguage: '',
|
|
|
|
|
|
interestTag: '',
|
|
|
|
|
|
industry: '',
|
|
|
|
|
|
dateRange: ['', '']
|
2025-03-24 16:58:33 +08:00
|
|
|
|
};
|
2025-03-19 19:38:32 +08:00
|
|
|
|
getReleaseList();
|
2025-03-24 16:58:33 +08:00
|
|
|
|
};
|
2025-03-19 19:38:32 +08:00
|
|
|
|
|
2025-03-20 20:51:16 +08:00
|
|
|
|
// 打开模态框的方法
|
|
|
|
|
|
const setDefult = () => {
|
2025-03-24 16:58:33 +08:00
|
|
|
|
columns.value = defultColumns.value;
|
2025-03-20 20:51:16 +08:00
|
|
|
|
};
|
2025-03-18 16:07:53 +08:00
|
|
|
|
// 打开模态框的方法
|
|
|
|
|
|
const openCountryModal = () => {
|
|
|
|
|
|
if (countryModalRef.value) {
|
|
|
|
|
|
countryModalRef.value.openModal(); // 调用子组件的方法
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
// 打开模态框的方法
|
|
|
|
|
|
const openOrgModal = () => {
|
|
|
|
|
|
if (orgModalRef.value) {
|
|
|
|
|
|
orgModalRef.value.openModal(); // 调用子组件的方法
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
2025-03-27 15:09:52 +08:00
|
|
|
|
// 更新 showColumnList 的方法
|
|
|
|
|
|
const updateTableKey = () => {
|
|
|
|
|
|
tableKey.value++; // 更新 tableKey,强制刷新表格
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-03-15 20:32:13 +08:00
|
|
|
|
// 更新 showColumnList 的方法
|
|
|
|
|
|
const updateShowColumnList = (newValue) => {
|
|
|
|
|
|
showColumnList.value = newValue;
|
2025-03-27 15:09:52 +08:00
|
|
|
|
// tableKey.value++; // 更新 tableKey,强制刷新表格
|
2025-03-15 20:32:13 +08:00
|
|
|
|
};
|
2025-03-18 16:07:53 +08:00
|
|
|
|
// 更新 showColumnList 的方法
|
|
|
|
|
|
const openCountryChart = (row) => {
|
|
|
|
|
|
// selectRow.value = row;
|
|
|
|
|
|
countryVisible.value = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
// 更新 showColumnList 的方法
|
|
|
|
|
|
const openOrgChart = (row) => {
|
|
|
|
|
|
// selectRow.value = row;
|
|
|
|
|
|
orgVisible.value = true;
|
|
|
|
|
|
};
|
2025-03-15 20:32:13 +08:00
|
|
|
|
|
2025-03-13 18:54:48 +08:00
|
|
|
|
// 跳转
|
|
|
|
|
|
const gotoDetail = (row) => {
|
|
|
|
|
|
// 后续请换成params,暂时params传参没传过去
|
|
|
|
|
|
router.push({
|
2025-03-18 17:43:51 +08:00
|
|
|
|
path: 'repoDetail/' + row.id
|
2025-03-13 18:54:48 +08:00
|
|
|
|
});
|
|
|
|
|
|
};
|
2025-03-13 16:09:33 +08:00
|
|
|
|
|
|
|
|
|
|
const repoFun = (arr: any) => {
|
|
|
|
|
|
return arr ? (arr.length > 3 ? arr.slice(0, 3) : arr) : [];
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 编辑
|
|
|
|
|
|
const editRow = (row: any) => {
|
|
|
|
|
|
// 后续请换成params,暂时params传参没传过去
|
|
|
|
|
|
router.push({
|
|
|
|
|
|
path: 'cla/edit/' + row.object_id,
|
|
|
|
|
|
query: { cla: row.cla, pageType: 'edit' }
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 确认删除
|
|
|
|
|
|
const confirmDelete = async (e: any) => {
|
|
|
|
|
|
// const res = await reqCatch(deleteGroupCla, { group_id: namespace.value, cla_id: item.value.object_id });
|
|
|
|
|
|
// if (!res.error) {
|
|
|
|
|
|
// getGroupClaListData();
|
|
|
|
|
|
// }
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 去成员页
|
|
|
|
|
|
const goMember = (row: any) => {
|
|
|
|
|
|
// 后续请换成params,暂时params传参没传过去,注意路由有个:claID
|
|
|
|
|
|
router.push({
|
|
|
|
|
|
path: 'cla/claId/member',
|
|
|
|
|
|
query: { claId: row.object_id, claName: row.cla_name, group_path: namespace.value, pageType: 'edit' }
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
const getGroupClaListData = async () => {
|
|
|
|
|
|
// const params = {
|
|
|
|
|
|
// group_id: namespace.value,
|
|
|
|
|
|
// page: pager.value.pageIndex,
|
|
|
|
|
|
// per_page: pager.value.pageSize
|
|
|
|
|
|
// };
|
|
|
|
|
|
// const res = await reqCatch(getGroupClaList, params);
|
|
|
|
|
|
// if (!res.error) {
|
|
|
|
|
|
// tableData.value = res?.data?.data?.content;
|
|
|
|
|
|
// pager.value.total = res.data.data.total;
|
|
|
|
|
|
// }
|
|
|
|
|
|
};
|
|
|
|
|
|
getGroupClaListData();
|
|
|
|
|
|
|
|
|
|
|
|
const setClaStatus = async (row: any) => {
|
|
|
|
|
|
// const params = {
|
|
|
|
|
|
// group_id: namespace.value,
|
|
|
|
|
|
// cla_id: row.object_id,
|
|
|
|
|
|
// status: row.status
|
|
|
|
|
|
// };
|
|
|
|
|
|
// const res = await reqCatch(setGroupClaStatus, params);
|
|
|
|
|
|
// if (!res.error) {
|
|
|
|
|
|
// Message.success('操作成功!');
|
|
|
|
|
|
// getGroupClaListData();
|
|
|
|
|
|
// }
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const signCla = (row: any) => {
|
|
|
|
|
|
router.push('/cla/' + row.object_id);
|
|
|
|
|
|
};
|
2025-03-15 17:02:06 +08:00
|
|
|
|
|
2025-03-24 16:58:33 +08:00
|
|
|
|
const getReleaseList = async () => {
|
2025-03-19 09:37:41 +08:00
|
|
|
|
const { data, error } = await releasePage({
|
2025-03-20 20:51:16 +08:00
|
|
|
|
softwareName: newFormData.value.softwareName || '',
|
|
|
|
|
|
searchType: newFormData.value.searchType || '',
|
|
|
|
|
|
softwareVersion: newFormData.value.softwareVersion || '',
|
|
|
|
|
|
programmingLanguage: newFormData.value.programmingLanguage || '',
|
|
|
|
|
|
interestTag: newFormData.value.interestTag || '',
|
|
|
|
|
|
industry: newFormData.value.industry || '',
|
|
|
|
|
|
licenseName: newFormData.value.licenseName || '',
|
|
|
|
|
|
dependentSoftware: newFormData.value.dependentSoftware || '',
|
2025-03-24 16:58:33 +08:00
|
|
|
|
releaseDateStart:
|
|
|
|
|
|
newFormData.value.dateRange && newFormData.value.dateRange.length > 0 ? newFormData.value.dateRange[0] : '',
|
|
|
|
|
|
releaseDateEnd:
|
|
|
|
|
|
newFormData.value.dateRange && newFormData.value.dateRange.length > 0 ? newFormData.value.dateRange[1] : '',
|
2025-03-19 13:39:31 +08:00
|
|
|
|
current: pager.value.pageIndex,
|
|
|
|
|
|
size: pager.value.pageSize
|
|
|
|
|
|
});
|
2025-03-18 17:43:51 +08:00
|
|
|
|
if (!error && data) {
|
2025-03-24 16:58:33 +08:00
|
|
|
|
allTableData.value = data.data.records;
|
2025-03-18 17:43:51 +08:00
|
|
|
|
tableData.value = data.data.records;
|
|
|
|
|
|
pager.value.total = data.data.total;
|
2025-03-19 20:47:53 +08:00
|
|
|
|
|
2025-03-24 16:58:33 +08:00
|
|
|
|
console.log(tableData.value);
|
2025-03-18 17:43:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-03-20 20:51:16 +08:00
|
|
|
|
const getLanguageList = async () => {
|
|
|
|
|
|
const res: any = await searchLanguageList();
|
|
|
|
|
|
if (!res.error) {
|
|
|
|
|
|
languageList.value = res.data.data;
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-03-24 16:58:33 +08:00
|
|
|
|
onMounted(async () => {
|
2025-06-13 18:01:31 +08:00
|
|
|
|
// await getLanguageList();
|
2025-03-24 16:58:33 +08:00
|
|
|
|
newFormData.value.softwareName = route.query.softwareName || '';
|
|
|
|
|
|
newFormData.value.searchType = route.query.searchType || '';
|
|
|
|
|
|
newFormData.value.softwareVersion = route.query.softwareVersion || '';
|
|
|
|
|
|
newFormData.value.programmingLanguage = route.query.programmingLanguage || '';
|
|
|
|
|
|
newFormData.value.interestTag = route.query.interestTag || '';
|
|
|
|
|
|
newFormData.value.industry = route.query.searchType || '';
|
|
|
|
|
|
newFormData.value.licenseName = route.query.licenseName || '';
|
|
|
|
|
|
newFormData.value.dependentSoftware = route.query.dependentSoftware || '';
|
|
|
|
|
|
newFormData.value.dateRange = [route.query.releaseDateStart || '', route.query.releaseDateEnd || ''];
|
2025-03-20 20:51:16 +08:00
|
|
|
|
nextTick(() => {
|
|
|
|
|
|
getReleaseList();
|
2025-03-24 16:58:33 +08:00
|
|
|
|
});
|
2025-03-19 20:47:53 +08:00
|
|
|
|
// getReleaseList();
|
2025-03-18 17:43:51 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
2025-03-31 17:12:11 +08:00
|
|
|
|
const exportResult = async () => {
|
2025-04-01 09:44:56 +08:00
|
|
|
|
const selectDatas = filterTableRef.value.store.getCheckedRows().map((d) => d.id);
|
|
|
|
|
|
if (!allTableData.value.length || selectDatas.length <= 0) {
|
|
|
|
|
|
Message.info('未选择任何数据');
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-31 17:12:11 +08:00
|
|
|
|
const { data, error } = await getReleaseExport({
|
2025-04-01 09:44:56 +08:00
|
|
|
|
list: selectDatas,
|
|
|
|
|
|
// softwareName: newFormData.value.softwareName || '',
|
|
|
|
|
|
// searchType: newFormData.value.searchType || '',
|
|
|
|
|
|
// softwareVersion: newFormData.value.softwareVersion || '',
|
|
|
|
|
|
// programmingLanguage: newFormData.value.programmingLanguage || '',
|
|
|
|
|
|
// interestTag: newFormData.value.interestTag || '',
|
|
|
|
|
|
// industry: newFormData.value.industry || '',
|
|
|
|
|
|
// licenseName: newFormData.value.licenseName || '',
|
|
|
|
|
|
// dependentSoftware: newFormData.value.dependentSoftware || '',
|
|
|
|
|
|
// releaseDateStart:
|
|
|
|
|
|
// newFormData.value.dateRange && newFormData.value.dateRange.length > 0 ? newFormData.value.dateRange[0] : '',
|
|
|
|
|
|
// releaseDateEnd:
|
|
|
|
|
|
// newFormData.value.dateRange && newFormData.value.dateRange.length > 0 ? newFormData.value.dateRange[1] : '',
|
|
|
|
|
|
// current: pager.value.pageIndex,
|
|
|
|
|
|
// size: pager.value.pageSize
|
2025-03-31 17:12:11 +08:00
|
|
|
|
});
|
|
|
|
|
|
if (data && !error) {
|
|
|
|
|
|
// 方法1:如果后端返回的是文件流(Blob)
|
|
|
|
|
|
const blob = new Blob([data.data]);
|
|
|
|
|
|
const downloadUrl = window.URL.createObjectURL(blob);
|
|
|
|
|
|
|
|
|
|
|
|
// 创建一个临时的a标签触发下载
|
|
|
|
|
|
const link = document.createElement('a');
|
|
|
|
|
|
link.href = downloadUrl;
|
|
|
|
|
|
|
|
|
|
|
|
// 从Content-Disposition头中获取文件名,或者使用默认文件名
|
|
|
|
|
|
const contentDisposition = data.headers['content-disposition'];
|
|
|
|
|
|
let fileName = 'export.xlsx'; // 默认文件名
|
2025-04-01 09:44:56 +08:00
|
|
|
|
// if (contentDisposition) {
|
|
|
|
|
|
// const fileNameMatch = contentDisposition.match(/filename="?(.+)"?/);
|
|
|
|
|
|
// if (fileNameMatch && fileNameMatch[1]) {
|
|
|
|
|
|
// fileName = fileNameMatch[1].replace(/^[^0-9]*|[^0-9.xlsx]*$/g, "");
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
2025-03-31 17:12:11 +08:00
|
|
|
|
|
|
|
|
|
|
link.setAttribute('download', fileName);
|
|
|
|
|
|
document.body.appendChild(link);
|
|
|
|
|
|
link.click();
|
|
|
|
|
|
|
|
|
|
|
|
// 清理
|
|
|
|
|
|
document.body.removeChild(link);
|
|
|
|
|
|
window.URL.revokeObjectURL(downloadUrl);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
console.error('导出失败:', error);
|
|
|
|
|
|
// 这里可以添加错误提示,比如使用Element Plus的ElMessage
|
2025-06-26 18:19:54 +08:00
|
|
|
|
// ElMessage.error('文件导出失败');
|
2025-03-31 17:12:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
2025-03-26 17:12:43 +08:00
|
|
|
|
|
|
|
|
|
|
// onMounted(() => {
|
|
|
|
|
|
// const query: any = route.query;
|
|
|
|
|
|
// newFormData.value = {
|
|
|
|
|
|
// ...query
|
|
|
|
|
|
// };
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
2025-03-31 17:12:11 +08:00
|
|
|
|
// const exportResult = () => {
|
|
|
|
|
|
//
|
|
|
|
|
|
// if (!allTableData.value.length) {
|
|
|
|
|
|
// Message.info('暂无结果');
|
|
|
|
|
|
// return;
|
|
|
|
|
|
// }
|
|
|
|
|
|
//
|
|
|
|
|
|
// const selectDatas = filterTableRef.value.store.getCheckedRows().map((d) => d.id);
|
|
|
|
|
|
// if (!allTableData.value.length || selectDatas.length <= 0) {
|
|
|
|
|
|
// Message.info('未选择任何数据');
|
|
|
|
|
|
// return;
|
|
|
|
|
|
// }
|
|
|
|
|
|
//
|
|
|
|
|
|
// const exportData = allTableData.value
|
|
|
|
|
|
// .filter((d) => {
|
|
|
|
|
|
// return selectDatas.includes(d.id);
|
|
|
|
|
|
// })
|
|
|
|
|
|
// .map((item) => {
|
|
|
|
|
|
// let res = {};
|
|
|
|
|
|
// columns.value.forEach((col) => {
|
|
|
|
|
|
// if (col.key === 'validStatus') {
|
|
|
|
|
|
// res[col.label] = validStatusMap[item[col.key]] ? validStatusMap[item[col.key]] : '';
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
// res[col.label] = item[col.key] ? item[col.key] : '';
|
|
|
|
|
|
// }
|
|
|
|
|
|
// });
|
|
|
|
|
|
// return res;
|
|
|
|
|
|
// });
|
|
|
|
|
|
//
|
|
|
|
|
|
// try {
|
|
|
|
|
|
// const workSheet = XLSX.utils.json_to_sheet(exportData);
|
|
|
|
|
|
// const workBook: any = { Sheets: { 校验结果: workSheet }, SheetNames: ['校验结果'] };
|
|
|
|
|
|
// const excelBuffer = XLSX.write(workBook, { bookType: 'xlsx', type: 'array' });
|
|
|
|
|
|
//
|
|
|
|
|
|
// const link = document.createElement('a');
|
|
|
|
|
|
// const blob = new Blob([excelBuffer]);
|
|
|
|
|
|
// link.setAttribute('href', window.URL.createObjectURL(blob));
|
|
|
|
|
|
// link.setAttribute('download', '软件存在及可信校验结果.xlsx');
|
|
|
|
|
|
// link.style.visibility = 'hidden';
|
|
|
|
|
|
// document.body.appendChild(link);
|
|
|
|
|
|
// link.click();
|
|
|
|
|
|
// document.body.removeChild(link);
|
|
|
|
|
|
// Message.success('导出成功');
|
|
|
|
|
|
// } catch {
|
|
|
|
|
|
// Message.error('导出失败');
|
|
|
|
|
|
// }
|
|
|
|
|
|
// };
|
2025-03-13 16:09:33 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
@import 'devui-theme/styles-var/devui-var.scss';
|
|
|
|
|
|
|
|
|
|
|
|
.secret-container {
|
|
|
|
|
|
position: relative;
|
2025-03-19 09:37:41 +08:00
|
|
|
|
min-height: 600px;
|
2025-03-13 16:09:33 +08:00
|
|
|
|
|
|
|
|
|
|
.secret-op {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.error {
|
|
|
|
|
|
color: $devui-contrast;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.devui-table__row td) {
|
|
|
|
|
|
padding-top: 16px;
|
|
|
|
|
|
padding-bottom: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.devui-tag .devui-tag--default) {
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 16px;
|
|
|
|
|
|
margin-right: 8px;
|
2025-03-24 16:58:33 +08:00
|
|
|
|
border: 1px solid #e3e3ee;
|
2025-03-13 16:09:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.one-line {
|
|
|
|
|
|
word-break: break-all;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
color: #9a9b9c;
|
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cur-title {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
color: #2d2d2e;
|
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.search-form {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
border-radius: 8px 0px 8px 8px;
|
|
|
|
|
|
//background: #F2F5FC;
|
|
|
|
|
|
|
2025-03-15 17:58:49 +08:00
|
|
|
|
.left-btn {
|
2025-03-13 16:09:33 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 28px;
|
|
|
|
|
|
bottom: 4px;
|
2025-03-15 17:58:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.output-btn {
|
2025-03-13 16:09:33 +08:00
|
|
|
|
color: #191919;
|
|
|
|
|
|
font-family: HarmonyOS Sans SC;
|
|
|
|
|
|
font-weight: regular;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
|
letter-spacing: 0px;
|
|
|
|
|
|
text-align: left;
|
2025-03-19 09:37:41 +08:00
|
|
|
|
}
|
2025-03-13 16:09:33 +08:00
|
|
|
|
|
2025-03-19 09:37:41 +08:00
|
|
|
|
.jyh-form-operation {
|
|
|
|
|
|
margin-left: 20px !important;
|
2025-03-13 16:09:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.secret-breadcrumb {
|
|
|
|
|
|
padding: 7px 20px 12px;
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|