修改授权中心样式
This commit is contained in:
parent
0592ddfeea
commit
d8a809ad27
@ -55,6 +55,10 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="isLicense" title="授权中心" width="800px" :before-close="handleLicenseClose"
|
||||
class="userInfoviewDialog">
|
||||
<License v-if="isLicense" @closeLicense="handleLicenseClose"/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -64,6 +68,10 @@
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useAuthStore } from '../stores/index.js'
|
||||
import api from '../services/api.js'
|
||||
import License from '@/views/License.vue'
|
||||
const isLicense = ref(false)
|
||||
|
||||
|
||||
const router = useRouter()
|
||||
const authStore = useAuthStore()
|
||||
const time = ref("");
|
||||
@ -97,6 +105,11 @@
|
||||
}
|
||||
function handleClose(){
|
||||
dialogVisible.value = false
|
||||
|
||||
}
|
||||
function handleLicenseClose(){
|
||||
isLicense.value = false
|
||||
// getLicense()
|
||||
}
|
||||
function dateFormat(row) {
|
||||
const daterc = row;
|
||||
@ -145,11 +158,11 @@
|
||||
time.value = dateFormat(new Date())
|
||||
|
||||
// 授权状态徽标:页面加载时检查 /api/license/info
|
||||
;(async () => {
|
||||
getLicense()
|
||||
})
|
||||
async function getLicense(){
|
||||
try {
|
||||
debugger
|
||||
const json = await api.get('/api/license/info')
|
||||
debugger
|
||||
if (!json || json.success !== true) {
|
||||
licenseBadge.value = '未授权'
|
||||
licenseClass.value = 'badge-invalid'
|
||||
@ -185,11 +198,10 @@
|
||||
licenseType.value = 'invalid'
|
||||
showActivateButton.value = true
|
||||
}
|
||||
})()
|
||||
})
|
||||
|
||||
}
|
||||
const goActivate = () => {
|
||||
router.push('/license')
|
||||
// router.push('/license')
|
||||
isLicense.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="license-container">
|
||||
<div class="page-header">
|
||||
<h2>授权中心</h2>
|
||||
<!-- <h2>授权中心</h2> -->
|
||||
<div class="desc">在此申请激活文件或上传授权包激活。</div>
|
||||
</div>
|
||||
<el-tabs v-model="activeTab">
|
||||
@ -14,7 +14,7 @@
|
||||
<el-form-item label="联系方式">
|
||||
<el-input v-model="form.contact_info" placeholder="请输入联系方式" />
|
||||
</el-form-item>
|
||||
<el-divider>软件信息</el-divider>
|
||||
<div class="hintbox">软件信息</div>
|
||||
<el-form-item label="产品">
|
||||
<el-input :model-value="software.product" disabled />
|
||||
</el-form-item>
|
||||
@ -56,7 +56,7 @@ import { ref, reactive, onMounted } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { systemAPI } from '../services/api.js'
|
||||
import { licenseAPI } from '../services/api.js'
|
||||
|
||||
const emit = defineEmits([ 'closeLicense']);
|
||||
const activeTab = ref('request')
|
||||
|
||||
const form = reactive({
|
||||
@ -134,6 +134,7 @@ const exportActivationFile = async () => {
|
||||
|
||||
downloadTextFile(filename, content)
|
||||
ElMessage.success('激活请求文件已导出')
|
||||
// emit('closeLicense', false);
|
||||
} else {
|
||||
throw new Error(res && res.error ? res.error : '生成激活文件失败')
|
||||
}
|
||||
@ -171,14 +172,26 @@ const activatePackage = async () => {
|
||||
|
||||
<style>
|
||||
.license-container {
|
||||
padding: 16px;
|
||||
padding:0 16px;
|
||||
color: #fff;
|
||||
}
|
||||
.page-header { margin-bottom: 12px; }
|
||||
.page-header h2 { margin: 0 0 4px 0; font-size: 20px; }
|
||||
.desc { color: #bbb; font-size: 12px; }
|
||||
.desc { color: #bbb; font-size: 14px; }
|
||||
.tab-content { padding: 12px 0; }
|
||||
.actions { margin-top: 12px; }
|
||||
.hint { margin-top: 8px; color: #bbb; font-size: 12px; }
|
||||
.license-form { max-width: 560px; }
|
||||
.hint { margin-top: 8px; color: #bbb; font-size: 14px; }
|
||||
.license-form { max-width: 100%; }
|
||||
|
||||
.el-tabs__item{
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
}
|
||||
.hintbox{
|
||||
font-size: 16px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user