Merge branch 'master' of https://gitcode.com/hk_openRepo/OpenRepo_Portal into dev-shenjianbin
This commit is contained in:
@@ -20,6 +20,11 @@ export function releasePage(data): Promise<any> {
|
||||
});
|
||||
}
|
||||
|
||||
// 导出校验结果
|
||||
export function exportVerifyResult() {
|
||||
|
||||
}
|
||||
|
||||
// 获取邀请列表
|
||||
export function getInviteListData(): catchRt<any> {
|
||||
return reqCatchV2(() =>
|
||||
|
||||
@@ -1,58 +1,66 @@
|
||||
<template>
|
||||
<div>
|
||||
<slot name="title"></slot>
|
||||
<!-- <slot name="title"></slot> -->
|
||||
<d-form :layout="props.layout" :label-align="'end'">
|
||||
<d-row :gutter="16">
|
||||
<d-col :span="8">
|
||||
<d-form-item field="name" label="软件名称">
|
||||
<d-input placeholder="请输入软件名称" v-model="formData.softwareName"/>
|
||||
<d-input placeholder="请输入软件名称" v-model="formData.softwareName" />
|
||||
</d-form-item>
|
||||
</d-col>
|
||||
<d-col :span="8">
|
||||
<d-form-item field="version" label="软件版本">
|
||||
<d-input v-model="formData.softwareVersion"/>
|
||||
<d-input placeholder="请输入软件版本" v-model="formData.softwareVersion" />
|
||||
</d-form-item>
|
||||
</d-col>
|
||||
<d-col :span="8">
|
||||
<d-form-item field="license" label="license">
|
||||
<d-input placeholder="请输入license名称" v-model="formData.licenseName"/>
|
||||
<d-input placeholder="请输入license名称" v-model="formData.licenseName" />
|
||||
</d-form-item>
|
||||
</d-col>
|
||||
</d-row>
|
||||
<d-row :gutter="16">
|
||||
<d-col :span="8">
|
||||
<d-form-item field="dependency" label="依赖软件名称">
|
||||
<d-input v-model="formData.dependentSoftware"/>
|
||||
<d-input placeholder="请输入依赖软件名称" v-model="formData.dependentSoftware" />
|
||||
</d-form-item>
|
||||
</d-col>
|
||||
<d-col :span="8">
|
||||
<d-form-item field="language" label="编程语言">
|
||||
<d-select :options="languageList" v-model="formData.programmingLanguage"></d-select>
|
||||
<d-select
|
||||
:options="languageList"
|
||||
:allow-clear="true"
|
||||
v-model="formData.programmingLanguage"
|
||||
placeholder="请选择编程语言"
|
||||
></d-select>
|
||||
</d-form-item>
|
||||
</d-col>
|
||||
<d-col :span="8">
|
||||
<d-form-item field="date" label="版本发布日期">
|
||||
<d-range-date-picker-pro v-model="formData.dateRange" style="width: 100%;"
|
||||
:placeholder="['开始日期', '结束日期']"/>
|
||||
<d-range-date-picker-pro
|
||||
v-model="formData.dateRange"
|
||||
style="width: 100%"
|
||||
:placeholder="['开始日期', '结束日期']"
|
||||
/>
|
||||
</d-form-item>
|
||||
</d-col>
|
||||
</d-row>
|
||||
<d-row :gutter="16">
|
||||
<d-col :span="8">
|
||||
<d-form-item field="interestTag" label="兴趣标签">
|
||||
<d-input v-model="formData.interestTag"/>
|
||||
<d-input placeholder="请输入兴趣标签" v-model="formData.interestTag" />
|
||||
</d-form-item>
|
||||
</d-col>
|
||||
<d-col :span="8">
|
||||
<d-form-item field="industry" label="行业">
|
||||
<d-input v-model="formData.industry"/>
|
||||
<d-input v-model="formData.industry" placeholder="请输入行业" />
|
||||
</d-form-item>
|
||||
</d-col>
|
||||
</d-row>
|
||||
<slot name="operation">
|
||||
<gc-form-operation style="display: flex; justify-content: center; gap: 8px;">
|
||||
<d-button style="width: 96px; height: 32px;" variant="solid" @click="submitForm">搜索</d-button>
|
||||
<d-button style="width: 96px; height: 32px;" @click="cancel">取消</d-button>
|
||||
<gc-form-operation style="display: flex; justify-content: center; gap: 8px">
|
||||
<d-button style="width: 96px; height: 32px" variant="solid" @click="submitForm">搜索</d-button>
|
||||
<d-button style="width: 96px; height: 32px" @click="cancel">取消</d-button>
|
||||
</gc-form-operation>
|
||||
</slot>
|
||||
</d-form>
|
||||
@@ -60,7 +68,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, defineEmits, defineProps, watch } from 'vue';
|
||||
import { ref, defineEmits, defineProps, watch, onMounted } from 'vue';
|
||||
import { searchLanguageList } from '@/api/jyh';
|
||||
const props = defineProps({
|
||||
layout: {
|
||||
@@ -80,27 +88,36 @@ const props = defineProps({
|
||||
dateRange: ['', '']
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
const emit = defineEmits(['submit', 'cancel', 'update:modelValue']);
|
||||
const languageList = ref([]);
|
||||
|
||||
const formData = ref({...props.modelValue});
|
||||
const formData = ref({ ...props.modelValue });
|
||||
|
||||
watch(() => props.modelValue, (newVal) => {
|
||||
if (JSON.stringify(newVal) !== JSON.stringify(formData.value)) {
|
||||
formData.value = {...newVal};
|
||||
}
|
||||
}, { deep: true });
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(newVal) => {
|
||||
if (JSON.stringify(newVal) !== JSON.stringify(formData.value)) {
|
||||
formData.value = { ...newVal };
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
watch(formData, (newVal) => {
|
||||
if (JSON.stringify(newVal) !== JSON.stringify(props.modelValue)) {
|
||||
emit('update:modelValue', {...newVal});
|
||||
}
|
||||
}, { deep: true });
|
||||
watch(
|
||||
formData,
|
||||
(newVal) => {
|
||||
if (JSON.stringify(newVal) !== JSON.stringify(props.modelValue)) {
|
||||
emit('update:modelValue', { ...newVal });
|
||||
localStorage.setItem('searchForm', JSON.stringify(newVal));
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
const submitForm = () => {
|
||||
emit('submit', formData.value);
|
||||
}
|
||||
};
|
||||
|
||||
const cancel = () => {
|
||||
formData.value = {
|
||||
@@ -112,20 +129,25 @@ const cancel = () => {
|
||||
interestTag: '',
|
||||
industry: '',
|
||||
dateRange: ['', '']
|
||||
}
|
||||
};
|
||||
emit('cancel');
|
||||
emit('update:modelValue', formData.value);
|
||||
}
|
||||
};
|
||||
|
||||
const getLanguageList = async() => {
|
||||
const res:any = await searchLanguageList();
|
||||
const getLanguageList = async () => {
|
||||
const res: any = await searchLanguageList();
|
||||
if (!res.error) {
|
||||
languageList.value = res.data.data;
|
||||
}
|
||||
}
|
||||
};
|
||||
getLanguageList();
|
||||
|
||||
onMounted(() => {
|
||||
const _searchForm = localStorage.getItem('searchForm');
|
||||
if (_searchForm) {
|
||||
formData.value = JSON.parse(_searchForm);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@@ -60,7 +60,7 @@ const onCategoryChange = (event) => {
|
||||
}
|
||||
|
||||
const search = () => {
|
||||
window.open(`/repoList?softwareName=${softwareName.value ? softwareName.value : ''}&searchType=${searchType.value}`, '_blank')
|
||||
window.open(`${import.meta.env.VITE_BASE_URL}repoList?softwareName=${softwareName.value ? softwareName.value : ''}&searchType=${searchType.value}`, '_blank')
|
||||
};
|
||||
|
||||
const handleClear = () => {
|
||||
|
||||
@@ -807,7 +807,7 @@ $active-panel: var(--color-G800);
|
||||
.login-modal {
|
||||
box-sizing: border-box;
|
||||
padding: 24px 28px 24px;
|
||||
width: 410px !important;
|
||||
width: 550px !important;
|
||||
border-radius: 3px !important;
|
||||
.btn-close {
|
||||
width: 12px !important;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="bg-white w-full flex flex-col items-center py-[20px]">
|
||||
<div class="bg-white w-full flex flex-col items-center py-[30px]">
|
||||
<slot name="img">
|
||||
<img
|
||||
v-if="!hideImg && imgSrc"
|
||||
@@ -8,23 +8,23 @@
|
||||
:src="imgSrc"
|
||||
alt="NoData"
|
||||
/>
|
||||
<img
|
||||
<!-- <img
|
||||
v-if="!hideImg && !small"
|
||||
class="block mb-[20px]"
|
||||
:width="imgWidth"
|
||||
src="/src/assets/imgs/jyh/nodata.svg"
|
||||
alt="NoData"
|
||||
/>
|
||||
/> -->
|
||||
<img
|
||||
v-if="!hideImg && small"
|
||||
class="block mb-[20px]"
|
||||
v-if="!hideImg"
|
||||
class="block mb-[5px] w-[120px]"
|
||||
:width="imgWidth"
|
||||
src="/src/assets/imgs/jyh/nodata_small.svg"
|
||||
alt="NoData"
|
||||
/>
|
||||
</slot>
|
||||
<slot>
|
||||
<div>没有查询到数据</div>
|
||||
<div class="text-gray-500">没有查询到数据</div>
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -41,14 +41,14 @@
|
||||
</d-dropdown>
|
||||
</template>
|
||||
<template #append>
|
||||
<div class="advanced-search" @click="openAdvancedSearch">
|
||||
<span>高级筛选</span>
|
||||
<d-badge :count="6" :bg-color="'#f0f0f0'"></d-badge>
|
||||
<d-icon :rotate="rotate" name="icon-chevron-down-2"></d-icon>
|
||||
<div id="advancedSearch close-isopen" class="advanced-search" @click="openAdvancedSearch">
|
||||
<span class="close-isopen">高级筛选</span>
|
||||
<d-badge :count="6" :bg-color="'#f0f0f0'" class="close-isopen"></d-badge>
|
||||
<d-icon class="close-isopen" :rotate="rotate" name="icon-chevron-down-2"></d-icon>
|
||||
</div>
|
||||
</template>
|
||||
</d-input>
|
||||
<d-dropdown-menu v-model="isOpen" :origin="searchInput?.$el" :offset="offset">
|
||||
<d-dropdown-menu v-model="isOpen" :origin="searchInput?.$el" :offset="offset" :clickOutside="closeOutside">
|
||||
<div class="advanced-search-menu" :style="{ width: dropdownWidth + 'px' }">
|
||||
<AdvanceSearch @submit="submit($event)" @cancel="isOpen = false" class="p-20" :layout="'vertical'">
|
||||
<template #title>
|
||||
@@ -59,7 +59,7 @@
|
||||
</d-dropdown-menu>
|
||||
<d-button color="primary" variant="solid" @click="search">搜索</d-button>
|
||||
</div>
|
||||
<d-button @click="check" ref="origin" icon="share" class="batch-btn">批量校验</d-button>
|
||||
<d-button v-if="isLogin" @click="check" ref="origin" icon="share" class="batch-btn">批量校验</d-button>
|
||||
<div class="home-information">
|
||||
<div class="info-title">
|
||||
<div class="sub-title">
|
||||
@@ -87,7 +87,9 @@
|
||||
@click="openWarningDetail(item, index)"
|
||||
>
|
||||
<span>{{ item.subject }}</span>
|
||||
<d-tag v-if="item.importance" :color="tagMap[item.importance].color" size="sm">{{ tagMap[item.importance].text }}</d-tag>
|
||||
<d-tag v-if="item.importance" :color="tagMap[item.importance].color" size="sm">{{
|
||||
tagMap[item.importance].text
|
||||
}}</d-tag>
|
||||
</div>
|
||||
<div class="time-container">
|
||||
<d-icon name="icon-time"></d-icon>
|
||||
@@ -111,7 +113,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
||||
import { ref, onMounted, onBeforeUnmount, computed } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useAccount } from '@/utils/hooks/useAccount';
|
||||
import AdvanceSearch from '@/components/AdvanceSearch/index.vue';
|
||||
@@ -120,6 +122,7 @@ import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDe
|
||||
import { useGlobalInfoStore } from '@/stores/Global';
|
||||
const { updateHeaderSearch } = useGlobalInfoStore();
|
||||
const { accountInfo } = useAccount();
|
||||
import { useDiscussGetUserInfo } from '@/api/discussion/hook';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
@@ -132,38 +135,41 @@ const searchOptions = ref(['软件']);
|
||||
const offset = ref({ mainAxis: 7, crossAxis: -10 });
|
||||
const isKeepOpen = ref(true);
|
||||
const isOpen = ref(false);
|
||||
const rotate = ref(0);
|
||||
const cateRotate = ref(0);
|
||||
const infoList = ref([]);
|
||||
const warningModalVisable = ref(false);
|
||||
const currentWarning = ref();
|
||||
|
||||
const { isLogin } = useDiscussGetUserInfo()
|
||||
const homeSearch = ref(null);
|
||||
const dropdownWidth = ref(0);
|
||||
const selectedCate = ref('软件');
|
||||
const tagMap = {
|
||||
'Critical': {
|
||||
Critical: {
|
||||
text: '致命',
|
||||
color: '#c7000b'
|
||||
},
|
||||
'High': {
|
||||
High: {
|
||||
text: '高',
|
||||
color: '#f66f6a'
|
||||
},
|
||||
'Medium': {
|
||||
Medium: {
|
||||
text: '中',
|
||||
color: '#fac20a'
|
||||
},
|
||||
'Low': {
|
||||
Low: {
|
||||
text: '低',
|
||||
color: '#5e7ce0'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const rotate = computed(() => {
|
||||
return isOpen.value ? 180 : 0;
|
||||
});
|
||||
|
||||
const searchInput = ref(null);
|
||||
const openAdvancedSearch = () => {
|
||||
isOpen.value = !isOpen.value;
|
||||
rotate.value = isOpen.value ? 180 : 0;
|
||||
inputGlow.value = isOpen.value;
|
||||
};
|
||||
|
||||
@@ -198,7 +204,7 @@ const updateDropdownWidth = () => {
|
||||
};
|
||||
|
||||
const search = () => {
|
||||
updateHeaderSearch({ searchWord: searchStr.value, searchType: selectedCate.value })
|
||||
updateHeaderSearch({ searchWord: searchStr.value, searchType: selectedCate.value });
|
||||
router.push({ name: 'Search' });
|
||||
};
|
||||
|
||||
@@ -236,6 +242,17 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
updateDropdownWidth();
|
||||
|
||||
document.querySelector('body').onclick = (e) => {
|
||||
const className = e.target.className;
|
||||
if (
|
||||
!className.includes('close-isopen') &&
|
||||
!className.includes('devui-badge__content') &&
|
||||
!className.includes('advanced-search')
|
||||
) {
|
||||
isOpen.value = false;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
|
||||
@@ -3,13 +3,18 @@
|
||||
<div class="license-info-content">
|
||||
<d-layout>
|
||||
<d-content class="dcontent">
|
||||
<d-table class="jyh-table" v-if="list.length>0" :data="list" style="width: 100%;">
|
||||
<d-table class="jyh-table" v-if="list.length > 0" :data="list" style="width: 100%">
|
||||
<template #empty>
|
||||
<NoData></NoData>
|
||||
</template>
|
||||
<d-column type="index" width="40"></d-column>
|
||||
<d-column v-for="(column, index) in tableConfig" :field="column.field"
|
||||
:header="column.header" :sortable="column.sortable" :sort-method="column.sortMethod"></d-column>
|
||||
<d-column
|
||||
v-for="(column, index) in tableConfig"
|
||||
:field="column.field"
|
||||
:header="column.header"
|
||||
:sortable="column.sortable"
|
||||
:sort-method="column.sortMethod"
|
||||
></d-column>
|
||||
<d-column header="详情" width="100px">
|
||||
<template #default="scope">
|
||||
<a class="devui-link" @click="openPanel(scope.row)">查看</a>
|
||||
@@ -20,7 +25,7 @@
|
||||
</d-content>
|
||||
</d-layout>
|
||||
</div>
|
||||
<div class="license-info-container-page">
|
||||
<div class="license-info-container-page" v-if="list.length > 0">
|
||||
<d-pagination
|
||||
size="sm"
|
||||
:total="pager.total"
|
||||
@@ -33,8 +38,8 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<d-drawer v-model="showDetail" style="width: 800px; padding: 20px" >
|
||||
<SidePanel :data="currentData" @close="close"/>
|
||||
<d-drawer v-model="showDetail" style="width: 800px; padding: 20px">
|
||||
<SidePanel :data="currentData" @close="close" />
|
||||
</d-drawer>
|
||||
</template>
|
||||
|
||||
@@ -48,20 +53,18 @@ const pager = ref({
|
||||
pageIndex: 1,
|
||||
pageSize: 30,
|
||||
total: 10
|
||||
})
|
||||
const pageOptions = ref({
|
||||
|
||||
})
|
||||
});
|
||||
const pageOptions = ref({});
|
||||
const showDetail = ref(false);
|
||||
|
||||
const close = () => {
|
||||
showDetail.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const openPanel = (row) => {
|
||||
currentData.value = row
|
||||
currentData.value = row;
|
||||
showDetail.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
const tableConfig = ref([
|
||||
{
|
||||
@@ -88,7 +91,7 @@ const tableConfig = ref([
|
||||
sortable: true,
|
||||
sortMethod: null
|
||||
}
|
||||
])
|
||||
]);
|
||||
|
||||
const list = ref([
|
||||
// {
|
||||
@@ -115,9 +118,9 @@ const list = ref([
|
||||
// affectedComponent: 'org.apache.commons:commons-collections4',
|
||||
// version: '4.4',
|
||||
// }
|
||||
])
|
||||
]);
|
||||
|
||||
const getList = async() => {
|
||||
const getList = async () => {
|
||||
const res: any = await getLicenseList();
|
||||
if (!res.error) {
|
||||
console.log(res);
|
||||
@@ -126,12 +129,11 @@ const getList = async() => {
|
||||
} else {
|
||||
list.value = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.license-info-container {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
@@ -159,7 +161,7 @@ getList();
|
||||
.dfooter {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
margin-top: 20px
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.operation {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="mb-3">
|
||||
<d-table v-if="tableData.length>0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||
<d-table v-if="tableData.length > 0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||
<d-column field="updateTime" header="时间">
|
||||
<template #default="scope">
|
||||
<span>{{ formatTime(scope.row.updateTime, 'YYYY-MM-DD') }}</span>
|
||||
@@ -14,19 +14,19 @@
|
||||
</d-column>
|
||||
<d-column field="alertMsg" header="详情">
|
||||
<template #default="scope">
|
||||
<span>{{ JSON.parse(scope.row.alertMsg)?.overview || ''}}</span>
|
||||
<span>{{ JSON.parse(scope.row.alertMsg)?.overview || '' }}</span>
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column field="level" header="级别">
|
||||
<template #default="scope">
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '高'" type="error">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '中'" type="warning">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '低'" class="yellow-status">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<!-- <d-status v-if="scope.row.importance === 1" type="running">提示</d-status>-->
|
||||
</template>
|
||||
@@ -41,14 +41,21 @@
|
||||
<NoData v-else :small="false"></NoData>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mt-20 mb-20 flex justify-end">
|
||||
<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="changeIndex()"
|
||||
@page-size-change="changeSize()" />
|
||||
<div class="mt-20 mb-20 flex justify-end" v-if="tableData.length > 0">
|
||||
<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="changeIndex()"
|
||||
@page-size-change="changeSize()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</Card>
|
||||
|
||||
<d-modal class="warning-modal" v-model="warningModalVisable" title="">
|
||||
@@ -59,7 +66,7 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
|
||||
import NoData from "@/components/NoData/NoData.vue";
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
import { getgroupNoticeList, getNoticeList } from '@/api/jyh';
|
||||
|
||||
const tableData = ref([
|
||||
@@ -83,19 +90,17 @@ const colseWarningDetail = () => {
|
||||
warningModalVisable.value = false;
|
||||
};
|
||||
|
||||
const getList = async() => {
|
||||
const { data, error } = await getgroupNoticeList({ current: 1,size: pager.value.pageSize });
|
||||
const getList = async () => {
|
||||
const { data, error } = await getgroupNoticeList({ current: 1, size: pager.value.pageSize });
|
||||
if (!error && data) {
|
||||
tableData.value = data.data.data.records;
|
||||
pager.value.total = data.data.data.total;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async() => {
|
||||
onMounted(async () => {
|
||||
getList();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="mb-3">
|
||||
<d-table v-if="tableData.length>0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||
<d-table v-if="tableData.length > 0" class="jyh-table jyh-table-2" :header-bg="true" :data="tableData">
|
||||
<d-column field="updateTime" header="时间"></d-column>
|
||||
<d-column field="name" header="标题">
|
||||
<template #default="scope">
|
||||
@@ -10,21 +10,21 @@
|
||||
</d-column>
|
||||
<d-column field="alertMsg" header="详情">
|
||||
<template #default="scope">
|
||||
<span>{{ JSON.parse(scope.row.alertMsg)?.overview || ''}}</span>
|
||||
<span>{{ JSON.parse(scope.row.alertMsg)?.overview || '' }}</span>
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column field="level" header="级别">
|
||||
<template #default="scope">
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '高'" type="error">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '中'" type="warning">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<d-status v-if="JSON.parse(scope.row.alertMsg)?.importance === '低'" class="yellow-status">
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || ''}}
|
||||
{{ JSON.parse(scope.row.alertMsg)?.importance || '' }}
|
||||
</d-status>
|
||||
<!-- <d-status v-if="scope.row.importance === 1" type="running">提示</d-status>-->
|
||||
<!-- <d-status v-if="scope.row.importance === 1" type="running">提示</d-status>-->
|
||||
</template>
|
||||
</d-column>
|
||||
<d-column field="status" header="状态">
|
||||
@@ -37,14 +37,21 @@
|
||||
<NoData v-else :small="false"></NoData>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mt-20 mb-20 flex justify-end">
|
||||
<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="changeIndex()"
|
||||
@page-size-change="changeSize()" />
|
||||
<div class="mt-20 mb-20 flex justify-end" v-if="tableData.length > 0">
|
||||
<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="changeIndex()"
|
||||
@page-size-change="changeSize()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</Card>
|
||||
|
||||
<d-modal class="warning-modal" v-model="warningModalVisable" title="">
|
||||
@@ -55,7 +62,7 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
|
||||
import NoData from "@/components/NoData/NoData.vue";
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
import { getNoticeList } from '@/api/jyh';
|
||||
|
||||
const tableData = ref([
|
||||
@@ -79,19 +86,17 @@ const colseWarningDetail = () => {
|
||||
warningModalVisable.value = false;
|
||||
};
|
||||
|
||||
const getList = async() => {
|
||||
const { data, error } = await getNoticeList({ current: 1,size: pager.value.pageSize });
|
||||
const getList = async () => {
|
||||
const { data, error } = await getNoticeList({ current: 1, size: pager.value.pageSize });
|
||||
if (!error && data) {
|
||||
tableData.value = data.data.data.records;
|
||||
pager.value.total = data.data.data.total;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async() => {
|
||||
onMounted(async () => {
|
||||
getList();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -2,40 +2,25 @@
|
||||
<div class="invitation-notice-container">
|
||||
<Card simple class="jyh-card mt-3">
|
||||
<div class="mt-3">
|
||||
<d-table
|
||||
class="jyh-table jyh-table-2"
|
||||
:header-bg="true"
|
||||
:data="noticeTableData"
|
||||
>
|
||||
<d-table class="jyh-table jyh-table-2" :header-bg="true" :data="noticeTableData">
|
||||
<d-column field="content" header="邀请内容" show-overflow-tooltip></d-column>
|
||||
<d-column field="createTime" header="邀请时间" width="200" show-overflow-tooltip></d-column>
|
||||
<d-column field="createUser" header="邀请人" width="180" show-overflow-tooltip></d-column>
|
||||
<d-column header="操作" width="150">
|
||||
<template #default="scope">
|
||||
<d-button
|
||||
variant="text"
|
||||
color="primary"
|
||||
class="mr-2"
|
||||
@click="handleAccept(scope.row, 1)"
|
||||
>
|
||||
<d-button variant="text" color="primary" class="mr-2" @click="handleAccept(scope.row, 1)">
|
||||
接收
|
||||
</d-button>
|
||||
<d-button
|
||||
variant="text"
|
||||
color="primary"
|
||||
@click="handleAccept(scope.row, -1)"
|
||||
>
|
||||
拒绝
|
||||
</d-button>
|
||||
<d-button variant="text" color="primary" @click="handleAccept(scope.row, -1)"> 拒绝 </d-button>
|
||||
</template>
|
||||
</d-column>
|
||||
<template #empty>
|
||||
<NoData />
|
||||
</template>
|
||||
</d-table>
|
||||
<div class="invitation-pagination">
|
||||
<div class="invitation-pagination" v-if="noticeTableData.length > 0">
|
||||
<d-pagination
|
||||
style="display: inline-flex;"
|
||||
style="display: inline-flex"
|
||||
:total="pager.total"
|
||||
v-model:pageSize="pager.pageSize"
|
||||
v-model:pageIndex="pager.pageIndex"
|
||||
@@ -53,30 +38,30 @@
|
||||
<script setup lang="ts">
|
||||
import { acceptInvite, getInviteListData } from '@/api/jyh';
|
||||
import { ref, shallowReactive } from 'vue';
|
||||
import NoData from "@/components/NoData/NoData.vue";
|
||||
import NoData from '@/components/NoData/NoData.vue';
|
||||
import { Message } from 'vue-devui';
|
||||
import dayjs from "dayjs";
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const noticeTableData = ref([]);
|
||||
const pager = shallowReactive({
|
||||
total: 0,
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: [10, 20, 30, 40, 50],
|
||||
pageSizeOptions: [10, 20, 30, 40, 50]
|
||||
});
|
||||
const queryInviteListData = async () => {
|
||||
const data = await getInviteListData();
|
||||
console.log(data)
|
||||
console.log(data);
|
||||
if (!data?.data?.data?.data) {
|
||||
pager.total = 0;
|
||||
return;
|
||||
}
|
||||
noticeTableData.value = data.data.data.data.map(item => {
|
||||
noticeTableData.value = data.data.data.data.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
content: `尊敬的用户,您好!为更好地整合资源、协同开发,现诚邀您加入组织【${item.name}】。`,
|
||||
createTime: dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss'),
|
||||
}
|
||||
createTime: dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss')
|
||||
};
|
||||
});
|
||||
pager.total = data.data.data.data.length;
|
||||
};
|
||||
@@ -84,18 +69,18 @@ queryInviteListData();
|
||||
const handleAccept = async (row, type) => {
|
||||
const data = await acceptInvite({
|
||||
groupId: row.groupId,
|
||||
status: type,
|
||||
status: type
|
||||
});
|
||||
if (data?.data?.data?.data) {
|
||||
Message({
|
||||
type: 'success',
|
||||
message: '成功接受',
|
||||
message: '成功接受'
|
||||
});
|
||||
queryInviteListData();
|
||||
} else {
|
||||
Message({
|
||||
type: 'error',
|
||||
message: '接受失败',
|
||||
message: '接受失败'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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,17 +243,20 @@ 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;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async() => {
|
||||
getReleaseList();
|
||||
// getReleaseList();
|
||||
});
|
||||
|
||||
const filterVerifyResult = (type) => {
|
||||
@@ -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) => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="soft-detail-container">
|
||||
<div class="mt-3">
|
||||
<d-table class="jyh-table" v-if="tableData.length>0" :striped="false" :data="tableData" table-layout="auto">
|
||||
<d-table class="jyh-table" v-if="tableData.length > 0" :striped="false" :data="tableData" table-layout="auto">
|
||||
<d-column type="index" width="40"></d-column>
|
||||
<d-column field="vulnId" header="编码" filterable :filter-list="filterList" @filter-change="handleFilterChange">
|
||||
<template #default="scope">
|
||||
@@ -69,7 +69,7 @@
|
||||
<NoData v-else :small="false"></NoData>
|
||||
</div>
|
||||
|
||||
<div class="mt-20 mb-20 flex justify-end">
|
||||
<div class="mt-20 mb-20 flex justify-end" v-if="tableData.length > 0">
|
||||
<d-pagination
|
||||
size="md"
|
||||
:page-size-options="[10, 20, 50]"
|
||||
@@ -95,7 +95,7 @@
|
||||
confirmColor="danger"
|
||||
>
|
||||
<span class="inline-block text-G900 text-sm font-normal leading-[20px] break-all"
|
||||
>你确认删除此项:{{ item.cla_name }} ?</span
|
||||
>你确认删除此项:{{ item.cla_name }} ?</span
|
||||
>
|
||||
</GModal>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
import * as dayjs from 'dayjs';
|
||||
import SettingTitle from '@/components/Setting/SettingTitle/index.vue';
|
||||
import SettingText from '@/components/Setting/SettingText/index.vue';
|
||||
import { ref, reactive, onMounted,defineProps } from 'vue';
|
||||
import { ref, reactive, onMounted, defineProps } from 'vue';
|
||||
import { getGroupClaList, setGroupClaStatus, deleteGroupCla } from '@/api/cla';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { GModal } from '@/components/Setting/index';
|
||||
@@ -238,17 +238,17 @@ const fetchVulnList = async () => {
|
||||
softwareId: propsData.versionId,
|
||||
componentId: '',
|
||||
current: pager.value.pageIndex,
|
||||
size: pager.value.pageSize,
|
||||
size: pager.value.pageSize
|
||||
});
|
||||
if(data.data.code===200) {
|
||||
if (data.data.code === 200) {
|
||||
tableData.value = data?.data?.data?.records || [];
|
||||
pager.value.total = data?.data?.data?.total || [];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const valLists = ref([]);
|
||||
onMounted( () => {
|
||||
fetchVulnList()
|
||||
onMounted(() => {
|
||||
fetchVulnList();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user