fix: bugs

This commit is contained in:
汪少伟
2025-03-20 16:30:06 +08:00
parent 32e05115c2
commit 25f7823cd4
7 changed files with 101 additions and 99 deletions

View File

@@ -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 {