merge junjie_dev into master
update: 提供翻页功能 Created-by: user8949 Commit-by: @user8949 Merged-by: user8949 Description: update: 提供翻页功能 See merge request: hk_openRepo/OpenRepo_Portal!56
This commit is contained in:
@@ -31,13 +31,13 @@
|
||||
<div class="left-btn">
|
||||
<a v-if="isLogin" class="cursor-pointer" href="/static/软件存在及可信校验模版.xlsx" download><i class="icon icon-download-2"></i>下载excel模板</a>
|
||||
<span v-if="isLogin" style="height: 14px" class="split"></span>
|
||||
<d-button v-if="isLogin" class="output-btn" icon="icon-share" variant="text">导出</d-button>
|
||||
<d-button v-if="isLogin" class="output-btn" icon="icon-share" variant="text" @click="exportResult">导出</d-button>
|
||||
<span v-if="isLogin" style="height: 14px" class="split"></span>
|
||||
<TableSetting :columns="columns" :show-column-list="showColumnList" @update:show-column-list="updateShowColumnList"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3 px-20">
|
||||
<d-table class="jyh-table" v-if="tableData.length" :striped="false" :data="tableData" table-layout="auto">
|
||||
<d-table class="jyh-table" v-if="tableData.length" :striped="false" :data="tableData" table-layout="auto" :show-loading="loading">
|
||||
|
||||
<!-- 索引列 -->
|
||||
<d-column type="index" width="40"></d-column>
|
||||
@@ -150,7 +150,7 @@ import { useAccountStore } from '@/stores/user';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import TableSetting from '@/components/TableSetting/index.vue';
|
||||
import FileUploadButton from '@/components/FileUploadButton/index.vue';
|
||||
import { releasePage, repoImport } from '@/api/jyh';
|
||||
import { releasePage, repoImport, exportVerifyResult } from '@/api/jyh';
|
||||
import NoData from "@/components/NoData/NoData.vue";
|
||||
|
||||
const useNum = computed(() => {
|
||||
@@ -201,6 +201,7 @@ const { isLogin } = storeToRefs(userInfo);
|
||||
const { namespace } = getOrgInfo();
|
||||
const allTableData = ref([]);
|
||||
const tableData = ref([]);
|
||||
const loading = ref(false);
|
||||
const columns = ref([
|
||||
{ key: 'validStatus', label: '校验结果', visible: true, filterable: true, sortable: false },
|
||||
{ key: 'softwareName', label: '软件名称', visible: true, filterable: true, sortable: false },
|
||||
@@ -242,12 +243,15 @@ const getReleaseList = async() => {
|
||||
if (!isLogin.value) {
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
const { data, error } = await releasePage({ current: pager.value.pageIndex,size: pager.value.pageSize });
|
||||
if (!error && data) {
|
||||
debugger
|
||||
loading.value = false;
|
||||
allTableData.value = data.data.records;
|
||||
tableData.value = [...allTableData.value]
|
||||
pager.value.total = data.data.total;
|
||||
} else {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -285,6 +289,10 @@ const handleBatchImport = async() => { // 多个项目导入
|
||||
loadingStatus.batchMigrating = false;
|
||||
};
|
||||
|
||||
const exportResult = async() => {
|
||||
|
||||
}
|
||||
|
||||
// 跳转
|
||||
const gotoDetail = (row) => {
|
||||
/*TODO:如果是可使用、有风险的,点击软件版本,可跳转到软件详情页面;如果是未治理的,无法跳转*/
|
||||
@@ -297,12 +305,12 @@ const gotoDetail = (row) => {
|
||||
};
|
||||
// 分页
|
||||
const changeIndex = () => {
|
||||
// getGroupClaListData();
|
||||
getReleaseList();
|
||||
};
|
||||
|
||||
const changeSize = () => {
|
||||
pager.value.pageIndex = 1;
|
||||
// getGroupClaListData();
|
||||
getReleaseList();
|
||||
};
|
||||
|
||||
const repoFun = (arr: any) => {
|
||||
|
||||
Reference in New Issue
Block a user