66 >
77 <template #header =" { titleId , titleClass } " >
88 <div class =" logo flex-center" :id =" titleId" :class =" titleClass" >
9- <LogoFull height =" 59px" />
9+ <LogoFull height =" 59px" />
1010 </div >
1111 </template >
1212 <div class =" about-ui" v-loading =" loading" >
1616 </div >
1717 <div class =" flex" >
1818 <span class =" label" >{{ $t('layout.about.expiredTime') }}</span >
19- <!-- <span
20- >{{ licenseInfo?.expired || '-' }}
21- <span class="color-danger" v-if="licenseInfo?.expired && fromNowDate(licenseInfo?.expired)"
22- >({{ fromNowDate(licenseInfo?.expired) }})</span
23- ></span
24- > -->
19+ <!-- <span-->
20+ <!-- >{{ licenseInfo?.expired || '-' }}-->
21+ <!-- <span class="color-danger"-->
22+ <!-- v-if="licenseInfo?.expired && fromNowDate(licenseInfo?.expired)"-->
23+ <!-- >({{ fromNowDate(licenseInfo?.expired) }})</span-->
24+ <!-- ></span-->
25+ <!-- >-->
2526 </div >
2627 <div class =" flex" >
2728 <span class =" label" >{{ $t('layout.about.edition.label') }}</span >
2829 <span >{{
29- user.showXpack()
30- ? $t('layout.about.edition.professional')
31- : $t('layout.about.edition.community')
32- }}</span >
30+ user.showXpack()
31+ ? $t('layout.about.edition.professional')
32+ : $t('layout.about.edition.community')
33+ }}</span >
3334 </div >
3435 <div class =" flex" >
3536 <span class =" label" >{{ $t('layout.about.version') }}</span
5354 v-hasPermission =" new Role('ADMIN')"
5455 >
5556 <el-button class =" border-primary mr-16"
56- >{{ $t('layout.about.update') }} License</el-button
57+ >{{ $t('layout.about.update') }} License
58+ </el-button
5759 >
5860 </el-upload >
5961 </div >
6466 </el-dialog >
6567</template >
6668<script setup lang="ts">
67- import { ref , computed , watch } from ' vue'
68- // import licenseApi from '@/api/license'
69- // import { fromNowDate } from '@/utils/time'
70- import { Role } from ' @/utils/permission/type'
69+ import {ref , computed , watch } from ' vue'
70+ import licenseApi from ' @/api/system /license'
71+ // import {fromNowDate} from '@/utils/time'
72+ import {Role } from ' @/utils/permission/type'
7173import useStore from ' @/stores'
72- const { user, theme } = useStore ()
74+
75+ const {user, theme} = useStore ()
7376const isDefaultTheme = computed (() => {
7477 return theme .isDefaultTheme ()
7578})
@@ -98,38 +101,43 @@ const open = () => {
98101const onChange = (file : any ) => {
99102 const fd = new FormData ()
100103 fd .append (' license_file' , file .raw )
101- // licenseApi.putLicense(fd, loading).then((res: any) => {
102- // getLicenseInfo()
103- // isUpdate.value = true
104- // })
104+ licenseApi .putLicense (fd , loading ).then ((res : any ) => {
105+ getLicenseInfo ()
106+ isUpdate .value = true
107+ })
105108}
109+
106110function getLicenseInfo() {
107- // licenseApi.getLicense(loading).then((res: any) => {
108- // licenseInfo.value = res.data?.license
109- // })
111+ licenseApi .getLicense (loading ).then ((res : any ) => {
112+ licenseInfo .value = res .data ?.license
113+ })
110114}
111115
112- defineExpose ({ open })
116+ defineExpose ({open })
113117 </script >
114118<style lang="scss" scope>
115119.about-dialog {
116120 padding : 0 0 24px 0 ;
117121 width : 620px ;
118122 font-weight : 400 ;
123+
119124 .el-dialog__header {
120125 background : var (--app-header-bg-color );
121126 margin-right : 0 ;
122127 height : 140px ;
123128 box-sizing : border-box ;
124129 border-radius : 4px 4px 0 0 ;
130+
125131 & .show-close {
126132 padding-right : 0 ;
127133 }
128134 }
135+
129136 .el-dialog__title {
130137 height : 140px ;
131138 box-sizing : border-box ;
132139 }
140+
133141 .about-ui {
134142 margin : 0 auto ;
135143 font-weight : 400 ;
@@ -144,6 +152,7 @@ defineExpose({ open })
144152 color : var (--app-text-color-secondary );
145153 }
146154 }
155+
147156 & .dialog-custom-header {
148157 .el-dialog__header {
149158 background : var (--el-color-primary-light-9 ) !important ;
0 commit comments