fix: bugs
This commit is contained in:
@@ -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: '接受失败'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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