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:
@@ -20,6 +20,11 @@ export function releasePage(data): Promise<any> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出校验结果
|
||||||
|
export function exportVerifyResult() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// 获取邀请列表
|
// 获取邀请列表
|
||||||
export function getInviteListData(): catchRt<any> {
|
export function getInviteListData(): catchRt<any> {
|
||||||
return reqCatchV2(() =>
|
return reqCatchV2(() =>
|
||||||
|
|||||||
@@ -31,13 +31,13 @@
|
|||||||
<div class="left-btn">
|
<div class="left-btn">
|
||||||
<a v-if="isLogin" class="cursor-pointer" href="/static/软件存在及可信校验模版.xlsx" download><i class="icon icon-download-2"></i>下载excel模板</a>
|
<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>
|
<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>
|
<span v-if="isLogin" style="height: 14px" class="split"></span>
|
||||||
<TableSetting :columns="columns" :show-column-list="showColumnList" @update:show-column-list="updateShowColumnList"/>
|
<TableSetting :columns="columns" :show-column-list="showColumnList" @update:show-column-list="updateShowColumnList"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3 px-20">
|
<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>
|
<d-column type="index" width="40"></d-column>
|
||||||
@@ -150,7 +150,7 @@ import { useAccountStore } from '@/stores/user';
|
|||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import TableSetting from '@/components/TableSetting/index.vue';
|
import TableSetting from '@/components/TableSetting/index.vue';
|
||||||
import FileUploadButton from '@/components/FileUploadButton/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";
|
import NoData from "@/components/NoData/NoData.vue";
|
||||||
|
|
||||||
const useNum = computed(() => {
|
const useNum = computed(() => {
|
||||||
@@ -201,6 +201,7 @@ const { isLogin } = storeToRefs(userInfo);
|
|||||||
const { namespace } = getOrgInfo();
|
const { namespace } = getOrgInfo();
|
||||||
const allTableData = ref([]);
|
const allTableData = ref([]);
|
||||||
const tableData = ref([]);
|
const tableData = ref([]);
|
||||||
|
const loading = ref(false);
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ key: 'validStatus', label: '校验结果', visible: true, filterable: true, sortable: false },
|
{ key: 'validStatus', label: '校验结果', visible: true, filterable: true, sortable: false },
|
||||||
{ key: 'softwareName', 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) {
|
if (!isLogin.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
loading.value = true;
|
||||||
const { data, error } = await releasePage({ current: pager.value.pageIndex,size: pager.value.pageSize });
|
const { data, error } = await releasePage({ current: pager.value.pageIndex,size: pager.value.pageSize });
|
||||||
if (!error && data) {
|
if (!error && data) {
|
||||||
debugger
|
loading.value = false;
|
||||||
allTableData.value = data.data.records;
|
allTableData.value = data.data.records;
|
||||||
tableData.value = [...allTableData.value]
|
tableData.value = [...allTableData.value]
|
||||||
pager.value.total = data.data.total;
|
pager.value.total = data.data.total;
|
||||||
|
} else {
|
||||||
|
loading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -285,6 +289,10 @@ const handleBatchImport = async() => { // 多个项目导入
|
|||||||
loadingStatus.batchMigrating = false;
|
loadingStatus.batchMigrating = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const exportResult = async() => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// 跳转
|
// 跳转
|
||||||
const gotoDetail = (row) => {
|
const gotoDetail = (row) => {
|
||||||
/*TODO:如果是可使用、有风险的,点击软件版本,可跳转到软件详情页面;如果是未治理的,无法跳转*/
|
/*TODO:如果是可使用、有风险的,点击软件版本,可跳转到软件详情页面;如果是未治理的,无法跳转*/
|
||||||
@@ -297,12 +305,12 @@ const gotoDetail = (row) => {
|
|||||||
};
|
};
|
||||||
// 分页
|
// 分页
|
||||||
const changeIndex = () => {
|
const changeIndex = () => {
|
||||||
// getGroupClaListData();
|
getReleaseList();
|
||||||
};
|
};
|
||||||
|
|
||||||
const changeSize = () => {
|
const changeSize = () => {
|
||||||
pager.value.pageIndex = 1;
|
pager.value.pageIndex = 1;
|
||||||
// getGroupClaListData();
|
getReleaseList();
|
||||||
};
|
};
|
||||||
|
|
||||||
const repoFun = (arr: any) => {
|
const repoFun = (arr: any) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user