feat(developer): 添加开发者信息展示功能
- 新增租户信息、服务器信息、源代码和其他信息四个展示组件 - 租户信息组件展示租户ID、系统名称、API地址、域名、后台管理地址、超管账号及到期时间 - 服务器信息组件展示公网IP、服务器厂商、到期时间和面板登录信息 - 源代码组件展示服务端、管理端和应用端的仓库名称、地址及备注 - 其他信息组件展示与源代码组件相同的内容,用于补充说明 - 更新开发者页面布局,引入上述四个信息展示组件- 重命名info.vue组件为TenantInfo.vue并重构其内容以适应新的展示需求
This commit is contained in:
68
src/views/system/developer/components/CodeInfo.vue
Normal file
68
src/views/system/developer/components/CodeInfo.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<a-table :columns="columns" :data-source="data" :pagination="false">
|
||||
<template #bodyCell="{ column, text }">
|
||||
</template>
|
||||
<template #footer>
|
||||
<div class="text-red-500 gap-3">
|
||||
<div>登录账号:u_{{ loginUser.userId }}</div>
|
||||
<div>初始密码:123456</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import {computed, ref} from 'vue';
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
import {CmsWebsite} from "@/api/cms/cmsWebsite/model";
|
||||
import {getSiteInfo} from "@/api/layout";
|
||||
|
||||
const userStore = useUserStore();// 当前用户信息
|
||||
const loginUser = computed(() => userStore.info ?? {});
|
||||
const website = ref<CmsWebsite>()
|
||||
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '仓库名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
},
|
||||
{
|
||||
title: '仓库地址',
|
||||
className: 'column-money',
|
||||
dataIndex: 'url',
|
||||
key: 'url',
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
},
|
||||
];
|
||||
|
||||
const data = [
|
||||
{
|
||||
key: '1',
|
||||
name: '服务端',
|
||||
url: 'https://git.websoft.top/gxwebsoft/mp-java.git',
|
||||
comments: '基于 Spring Boot + MyBatis Plus 的企业级后端API服务',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: '管理端',
|
||||
url: 'https://code.websoft.top/gxwebsoft/mp-vue.git',
|
||||
comments: '基于 Vue 3 + Ant Design Vue 的企业级后台管理系统',
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
name: '应用端',
|
||||
url: 'https://git.websoft.top/gxwebsoft/template-10559.git',
|
||||
comments: '基于 Taro + React + TypeScript 的跨平台小程序应用',
|
||||
},
|
||||
];
|
||||
|
||||
const reload = async () => {
|
||||
website.value = await getSiteInfo();
|
||||
};
|
||||
|
||||
reload()
|
||||
</script>
|
||||
68
src/views/system/developer/components/ParamInfo.vue
Normal file
68
src/views/system/developer/components/ParamInfo.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<a-table :columns="columns" :data-source="data" :pagination="false">
|
||||
<template #bodyCell="{ column, text }">
|
||||
</template>
|
||||
<template #footer>
|
||||
<div class="text-red-500 gap-3">
|
||||
<div>登录账号:u_{{ loginUser.userId }}</div>
|
||||
<div>初始密码:123456</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-table>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import {computed, ref} from 'vue';
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
import {CmsWebsite} from "@/api/cms/cmsWebsite/model";
|
||||
import {getSiteInfo} from "@/api/layout";
|
||||
|
||||
const userStore = useUserStore();// 当前用户信息
|
||||
const loginUser = computed(() => userStore.info ?? {});
|
||||
const website = ref<CmsWebsite>()
|
||||
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
},
|
||||
{
|
||||
title: '内容',
|
||||
className: 'column-money',
|
||||
dataIndex: 'url',
|
||||
key: 'url',
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
dataIndex: 'comments',
|
||||
},
|
||||
];
|
||||
|
||||
const data = [
|
||||
{
|
||||
key: '1',
|
||||
name: '服务端',
|
||||
url: 'https://git.websoft.top/gxwebsoft/mp-java.git',
|
||||
comments: '基于 Spring Boot + MyBatis Plus 的企业级后端API服务',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: '管理端',
|
||||
url: 'https://code.websoft.top/gxwebsoft/mp-vue.git',
|
||||
comments: '基于 Vue 3 + Ant Design Vue 的企业级后台管理系统',
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
name: '应用端',
|
||||
url: 'https://git.websoft.top/gxwebsoft/template-10559.git',
|
||||
comments: '基于 Taro + React + TypeScript 的跨平台小程序应用',
|
||||
},
|
||||
];
|
||||
|
||||
const reload = async () => {
|
||||
website.value = await getSiteInfo();
|
||||
};
|
||||
|
||||
reload()
|
||||
</script>
|
||||
28
src/views/system/developer/components/ServerInfo.vue
Normal file
28
src/views/system/developer/components/ServerInfo.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<a-descriptions>
|
||||
<a-descriptions-item label="公网IP">
|
||||
<a-tag>1.14.159.185</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions label="服务器厂商">
|
||||
<a-tag>阿里云</a-tag>
|
||||
</a-descriptions>
|
||||
<a-descriptions-item label="到期时间">
|
||||
<a-tag>2025-09-01 00:00:00</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="面板">
|
||||
<div class="flex flex-col gap-2">
|
||||
<a-tag>https://1.14.159.185:9000/cproot/</a-tag>
|
||||
<a-tag>vo0wowwj</a-tag>
|
||||
<a-tag>LWM6B5NbAP</a-tag>
|
||||
</div>
|
||||
</a-descriptions-item>
|
||||
|
||||
</a-descriptions>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import {computed} from 'vue';
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
|
||||
const userStore = useUserStore();// 当前用户信息
|
||||
const loginUser = computed(() => userStore.info ?? {});
|
||||
</script>
|
||||
46
src/views/system/developer/components/TenantInfo.vue
Normal file
46
src/views/system/developer/components/TenantInfo.vue
Normal file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<a-descriptions v-if="website">
|
||||
<a-descriptions-item label="租户ID">
|
||||
<a-tag>{{ website.appId }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions label="系统名称">
|
||||
<a-tag>{{ website?.appName }}</a-tag>
|
||||
</a-descriptions>
|
||||
<a-descriptions-item label="API">
|
||||
<a-tag>https://cms-api.websoft.top/api</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="域名" v-if="website?.domain">
|
||||
<a-tag>{{ website?.domain }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="后台管理">
|
||||
<a-tag>https://mp.websoft.top</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="超管账号">
|
||||
<a-tag>superAdmin</a-tag>
|
||||
<a-tag>vo0wowwj</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="到期时间">
|
||||
<a-tag>{{ website?.expirationTime }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<!-- <a-descriptions-item label="开发">-->
|
||||
<!-- {{ website }}-->
|
||||
<!-- </a-descriptions-item>-->
|
||||
|
||||
</a-descriptions>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import {computed, ref} from 'vue';
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
import {getSiteInfo} from "@/api/layout";
|
||||
import {CmsWebsite} from "@/api/cms/cmsWebsite/model";
|
||||
|
||||
const userStore = useUserStore();// 当前用户信息
|
||||
const loginUser = computed(() => userStore.info ?? {});
|
||||
const website = ref<CmsWebsite>()
|
||||
|
||||
const reload = async () => {
|
||||
website.value = await getSiteInfo();
|
||||
};
|
||||
|
||||
reload()
|
||||
</script>
|
||||
@@ -1,51 +0,0 @@
|
||||
<template>
|
||||
<a-table :dataSource="dataSource" :columns="columns" :pagination="false">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'name'">
|
||||
<div class="flex">
|
||||
<span class="w-32">{{ record.name }}</span>
|
||||
<span class="w-32">{{ record.value }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<template v-if="record.key === '2'">
|
||||
<a-button>重置</a-button>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
setup() {
|
||||
return {
|
||||
columns: [
|
||||
{
|
||||
title: '开发者ID',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 240,
|
||||
},
|
||||
],
|
||||
dataSource: [
|
||||
{
|
||||
key: '1',
|
||||
name: '租户ID',
|
||||
value: '10550'
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: 'AppSecret',
|
||||
value: 'sdfsdfsdfsdfs'
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -1,26 +1,29 @@
|
||||
<template>
|
||||
<a-page-header :title="getPageTitle()" @back="() => $router.go(-1)">
|
||||
<a-card title="开发者ID" style="margin-bottom: 20px">
|
||||
<Info/>
|
||||
<a-card title="租户信息" style="margin-bottom: 20px">
|
||||
<!-- <template #extra>-->
|
||||
<!-- <a-button>编辑</a-button>-->
|
||||
<!-- </template>-->
|
||||
<TenantInfo/>
|
||||
</a-card>
|
||||
<a-card title="服务器域名" style="margin-bottom: 20px">
|
||||
<template #extra>
|
||||
<a-button type="primary" @click="push(`/system/role`)">添加</a-button>
|
||||
</template>
|
||||
<Info/>
|
||||
<a-card title="服务器信息" style="margin-bottom: 20px">
|
||||
<ServerInfo/>
|
||||
</a-card>
|
||||
<a-card title="业务域名" style="margin-bottom: 20px">
|
||||
<template #extra>
|
||||
<a-button type="primary" @click="push(`/system/role`)">添加</a-button>
|
||||
</template>
|
||||
<Info/>
|
||||
<a-card title="源代码" style="margin-bottom: 20px">
|
||||
<CodeInfo/>
|
||||
</a-card>
|
||||
<a-card title="其他信息" style="margin-bottom: 20px">
|
||||
<ParamInfo />
|
||||
</a-card>
|
||||
</a-page-header>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {getPageTitle, push} from "@/utils/common";
|
||||
import Info from './components/info.vue'
|
||||
import TenantInfo from './components/TenantInfo.vue'
|
||||
import ServerInfo from './components/ServerInfo.vue'
|
||||
import CodeInfo from "./components/CodeInfo.vue";
|
||||
import ParamInfo from "./components/ParamInfo.vue";
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user