merge junjie_dev into master

update: 许可证信息页面更新

Created-by: user8949
Commit-by: @user8949
Merged-by: user8949
Description: update: 许可证信息页面更新

See merge request: hk_openRepo/OpenRepo_Portal!6
This commit is contained in:
user8949
2025-03-15 12:01:52 +08:00
5 changed files with 137 additions and 55 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

View File

@@ -13,12 +13,19 @@
</div> </div>
</d-header> </d-header>
<d-content class="dcontent"> <d-content class="dcontent">
<div class="content-title"></div> <div class="dcontent-title">
<div class="content-body"> <h1>许可证属性</h1>
<d-row> </div>
<div class="dcontent-body">
<d-row :gutter="10">
<d-col :span="8"> <d-col :span="8">
<div class="content-body-col"> <div class="content-body-col">
<span class="color-allow">允许的</span> <div class="dcontent-body-col-title dcontent-body-col-title-1">
<div class="dcontent-body-col-title-icon">
<img src="@/assets/imgs/jyh/license/allow.webp">
</div>
<span>允许的</span>
</div>
<span>Commercial Use</span> <span>Commercial Use</span>
<span>Modify</span> <span>Modify</span>
<span>Distribute</span> <span>Distribute</span>
@@ -28,7 +35,12 @@
</d-col> </d-col>
<d-col :span="8"> <d-col :span="8">
<div class="content-body-col"> <div class="content-body-col">
<span class="color-info">必要的</span> <div class="dcontent-body-col-title dcontent-body-col-title-2">
<div class="dcontent-body-col-title-icon">
<img src="@/assets/imgs/jyh/license/warning.webp">
</div>
<span>必要的</span>
</div>
<span>Include Copyright</span> <span>Include Copyright</span>
<span>Include License</span> <span>Include License</span>
<span>State changes</span> <span>State changes</span>
@@ -37,7 +49,12 @@
</d-col> </d-col>
<d-col :span="8"> <d-col :span="8">
<div class="content-body-col"> <div class="content-body-col">
<span class="color-danger">受限的</span> <div class="dcontent-body-col-title dcontent-body-col-title-3">
<div class="dcontent-body-col-title-icon">
<img src="@/assets/imgs/jyh/license/notAllow.webp">
</div>
<span>受限的</span>
</div>
<span>Place Warranty</span> <span>Place Warranty</span>
<span>Hold Liable</span> <span>Hold Liable</span>
<span>Use Trademark</span> <span>Use Trademark</span>
@@ -73,25 +90,84 @@ const emit = defineEmits(['close']);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: start; align-items: start;
gap: 8px; .dheader {
padding: 12px;
.dheader, .dcontent{
width: 100%; width: 100%;
border-bottom: 1px solid gray;
padding: 12px;
} }
.dfooter { .dcontent {
border-radius: 8px;
border: 1px solid #EEF0F5;
margin: 20px 0;
width: 100%; width: 100%;
padding: 12px; &-title {
height: 40px;
background-color: $devui-area;
display: flex;
justify-content: left;
align-items: center;
h1 {
padding-left: 20px;
color: #252B3A;
font-weight: 800;
font-size: 14px;
line-height: 22px;
letter-spacing: 0px;
}
}
&-body {
padding: 20px;
&-col-title {
width: 100%;
height: 23px;
border-radius: 14px;
border: 1px solid;
display: flex;
align-items: center;
img {
width: 14px;
height: 14px;
}
&-icon {
height: 100%;
width: 32px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 14px 0 0 14px;
margin-right: 8px;
}
&-1 {
border-color: #24B286;
.dcontent-body-col-title-icon {
background-color: #24B286;
}
}
&-2 {
border-color: #FAC20A;
.dcontent-body-col-title-icon {
background-color: #FAC20A;
}
}
&-3 {
border-color: $devui-danger;
.dcontent-body-col-title-icon {
background-color: $devui-danger;
}
}
}
}
} }
.title { .title {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
display: flex; display: flex;
width: 100%;
justify-content: space-between; justify-content: space-between;
align-items: center;
d-icon { d-icon {
cursor: pointer; cursor: pointer;
} }
@@ -111,6 +187,10 @@ const emit = defineEmits(['close']);
} }
.dfooter { .dfooter {
border-radius: 8px;
border: 1px solid #EEF0F5;
padding: 20px;
width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: start; align-items: start;
@@ -118,20 +198,7 @@ const emit = defineEmits(['close']);
} }
.side-panel { .side-panel {
padding: 20px;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 4px; border-radius: 4px;
} }
.color-danger {
color: $devui-danger;
}
.color-info {
color: $devui-warning;
}
.color-allow {
color: $devui-success;
}
</style> </style>

View File

@@ -1,42 +1,60 @@
<template> <template>
<div class="license-info-container"> <div class="license-info-container">
<div class="license-info-content" :class="{ 'license-info-content-full': !showDetail, 'license-info-half': showDetail }"> <div class="license-info-content">
<d-layout> <d-layout>
<d-header class="dheader">
<d-search icon-position="left" style="width: 200px" placeholder="搜索许可证名称"></d-search>
<d-search icon-position="left" style="width: 200px" placeholder="搜索组件名称"></d-search>
<d-select style="width: 200px" placeholder="许可证种类"></d-select>
</d-header>
<d-content class="dcontent"> <d-content class="dcontent">
<d-table :data="list" :header-bg="true"> <d-table :data="list" style="width: 100%;">
<d-column type="index" width="40"></d-column>
<d-column v-for="(column, index) in tableConfig" :field="column.field" <d-column v-for="(column, index) in tableConfig" :field="column.field"
:header="column.header" :sortable="column.sortable" :sort-method="column.sortMethod"></d-column> :header="column.header" :sortable="column.sortable" :sort-method="column.sortMethod"></d-column>
<d-column header="详情" width="100px"> <d-column header="详情" width="100px">
<template #default="scope"> <template #default="scope">
<img src="@/assets/imgs/jyh/ic_digital_power_next_step_@2x.png" class="operation" @click="showDetail = !showDetail"> <a class="devui-link" @click="openPanel">查看</a>
</template> </template>
</d-column> </d-column>
</d-table> </d-table>
</d-content> </d-content>
<d-footer class="dfooter">Footer</d-footer>
</d-layout> </d-layout>
</div> </div>
<div class="license-info-side" v-if="showDetail"> <div class="license-info-container-page">
<SidePanel @close="close"/> <d-pagination
size="sm"
:total="pager.total"
v-model:pageSize="pager.pageSize"
v-model:pageIndex="pager.pageIndex"
:can-view-total="true"
:can-change-page-size="true"
:can-jump-page="true"
:max-items="5"
/>
</div> </div>
</div> </div>
<d-drawer v-model="showDetail" style="width: 800px; padding: 20px" >
<SidePanel @close="close"/>
</d-drawer>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import Table from '@/components/AIRepair/Table.vue';
import SidePanel from '@/components/LicenseInfo/SidePanel.vue'; import SidePanel from '@/components/LicenseInfo/SidePanel.vue';
const pager = ref({
pageIndex: 1,
pageSize: 30,
total: 10
})
const pageOptions = ref({
})
const showDetail = ref(false); const showDetail = ref(false);
const close = () => { const close = () => {
showDetail.value = false; showDetail.value = false;
} }
const openPanel = () => {
showDetail.value = true;
}
const tableConfig = ref([ const tableConfig = ref([
{ {
field: 'licenseName', field: 'licenseName',
@@ -95,21 +113,18 @@ const list = ref([
<style scoped lang="scss"> <style scoped lang="scss">
.license-info-container { .license-info-container {
height: calc(100vh - 250px);
display: flex; display: flex;
gap: 8px; gap: 12px;
flex-direction: column;
width: 100%; width: 100%;
background-color: $devui-global-bg-normal;
.license-info-content { .license-info-content {
flex-grow: 1; background-color: $devui-global-bg-normal;
height: 100%; border-radius: 10px;
transition: width 0.3s; }
&.license-info-content-full { &-page {
width: 100%; width: 100%;
} display: flex;
&.license-info-half { justify-content: end;
width: 60%;
}
} }
} }
@@ -121,10 +136,10 @@ const list = ref([
padding: 12px; padding: 12px;
} }
.license-info-side { .dfooter {
height: 100%; display: flex;
width: 40%; justify-content: end;
border-left: 1px solid #e8e8e8; margin-top: 20px
} }
.operation { .operation {