--------去掉对es的支持和依赖,默认去掉对hive的包依赖,maven依赖关系优化,页面位置调整,增加build.bat的支持,支持jar直接启动,去掉历史遗留的无用前端代码,依赖的maven包升级--------
This commit is contained in:
@@ -24,38 +24,6 @@
|
||||
<div class="logo-img"><img src="../../assets/img/dubbo.png"></div>
|
||||
<div>Dubbo文档</div>
|
||||
</div>
|
||||
<div class="item" v-on:click="jumpToDocPage('doc-es')">
|
||||
<div class="logo-text text4">ES</div>
|
||||
<div>es文档</div>
|
||||
</div>
|
||||
<el-tooltip effect="dark" content="不成熟,欢迎完善" placement="top-start">
|
||||
<div class="item disabled">
|
||||
<div class="logo-text">GRPC</div>
|
||||
<div>GRPC文档</div>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="padding: 20px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>二方库-集成代理版</span>
|
||||
<a target="_blank" href="http://doc.zyplayer.com/zyplayer-doc-manage/doc-wiki#/page/share/view?pageId=76&space=23f3f59a60824d21af9f7c3bbc9bc3cb"><i class="el-icon-info" style="color: #999;"></i></a>
|
||||
</div>
|
||||
<div class="product-list">
|
||||
<el-tooltip effect="dark" content="swagger的原生官方文档" placement="top-start">
|
||||
<div class="item" v-on:click="jumpToDocPage('swagger-ui.html')">
|
||||
<div class="logo-text text1">swagger</div>
|
||||
<div>原生文档</div>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" content="swagger-bootstrap-ui文档" placement="top-start">
|
||||
<div class="item" v-on:click="jumpToDocPage('doc.html')">
|
||||
<div class="logo-text text2">swagger</div>
|
||||
<div>二方文档</div>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
@@ -85,9 +85,11 @@
|
||||
},
|
||||
methods: {
|
||||
docChecked(val, node) {
|
||||
if (node.node.isLeaf) {
|
||||
if (node.node.key === 'main') {
|
||||
this.$router.push({path: '/swagger/info'});
|
||||
} else if (node.node.isLeaf) {
|
||||
let dataRef = node.node.dataRef;
|
||||
this.$router.push({path: '/doc/view', query: dataRef.query});
|
||||
this.$router.push({path: '/swagger/view', query: dataRef.query});
|
||||
}
|
||||
},
|
||||
getGlobalParamList() {
|
||||
@@ -102,12 +104,14 @@
|
||||
this.swaggerResourceList = res || [];
|
||||
if (this.swaggerResourceList.length > 0 && !this.swaggerDocChoice) {
|
||||
// 加载初始化的地址
|
||||
if (this.$route.path === '/doc/view' && this.$route.query.url) {
|
||||
let showSwaggerInfo = false;
|
||||
if (this.$route.path === '/swagger/view' && this.$route.query.url) {
|
||||
this.swaggerDocChoice = this.$route.query.url;
|
||||
} else {
|
||||
showSwaggerInfo = true;
|
||||
this.swaggerDocChoice = this.swaggerResourceList[0].url;
|
||||
}
|
||||
this.swaggerDocChoiceChange();
|
||||
this.loadV2Doc(showSwaggerInfo);
|
||||
}
|
||||
} else {
|
||||
this.$message.error('获取文档列表请求失败');
|
||||
@@ -115,9 +119,9 @@
|
||||
});
|
||||
},
|
||||
swaggerDocChoiceChange() {
|
||||
this.loadV2Doc();
|
||||
this.loadV2Doc(true);
|
||||
},
|
||||
loadV2Doc() {
|
||||
loadV2Doc(showSwaggerInfo) {
|
||||
this.treeDataLoading = true;
|
||||
let swaggerResource = this.swaggerResourceList.find(item => item.url === this.swaggerDocChoice);
|
||||
if (!swaggerResource) {
|
||||
@@ -139,7 +143,12 @@
|
||||
this.$store.commit('setMethodStatistic', treeData.methodStatistic);
|
||||
this.pathData = treeData.pathData;
|
||||
this.loadTreeData();
|
||||
setTimeout(() => this.treeDataLoading = false, 100);
|
||||
setTimeout(() => {
|
||||
this.treeDataLoading = false;
|
||||
if (showSwaggerInfo) {
|
||||
this.$router.push({path: '/swagger/info'});
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
},
|
||||
loadTreeData() {
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
}
|
||||
},
|
||||
addPageTab() {
|
||||
this.$router.push({path: '/doc/apiRequest', query: {id: this.apiRequestIndex++}});
|
||||
this.$router.push({path: '/api/request', query: {id: this.apiRequestIndex++}});
|
||||
},
|
||||
removePageTab(key) {
|
||||
if (this.pageList.length === 1) {
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
<a-select-option value="true">TRUE</a-select-option>
|
||||
<a-select-option value="false">FALSE</a-select-option>
|
||||
</a-select>
|
||||
<a-upload v-else-if="record.type==='file' || record.subType === 'file' || record.subType === 'MultipartFile'"
|
||||
<a-upload v-else-if="isFileType(record.type)"
|
||||
:file-list="record.value" name="file" :multiple="record.type === 'array'"
|
||||
:before-upload="file=>{return beforeUpload(file, record)}"
|
||||
:remove="file=>{return handleRemove(file, record)}"
|
||||
>
|
||||
<a-button><upload-outlined></upload-outlined>选择文件</a-button>
|
||||
<a-button><upload-outlined/>选择文件</a-button>
|
||||
</a-upload>
|
||||
<a-input v-else :placeholder="record.description || '请输入参数值'" v-model:value="record.value" @change="queryParamChange(record)"></a-input>
|
||||
</template>
|
||||
@@ -131,13 +131,21 @@
|
||||
const handleRemove = (file, record) => {
|
||||
record.value = record.value.filter(item => item !== file);
|
||||
};
|
||||
const isFileType = record => {
|
||||
return record.type === 'file' || record.subType === 'file' || record.subType === 'MultipartFile';
|
||||
};
|
||||
let multilineEdit = ref(false);
|
||||
let multilineEditValue = ref('');
|
||||
const toMultilineEdit = () => {
|
||||
multilineEdit.value = true;
|
||||
multilineEditValue.value = paramListRef.value.filter(item => item.name || item.value)
|
||||
.map(item => (item.name || '') + ':' + (item.value || ''))
|
||||
.join('\n');
|
||||
.map(item => {
|
||||
// 文件类型多行编辑时不支持值的展示
|
||||
if (isFileType(item)) {
|
||||
return (item.name || '') + ':';
|
||||
}
|
||||
return (item.name || '') + ':' + (item.value || '');
|
||||
}).join('\n');
|
||||
};
|
||||
const toKeyValueEdit = () => {
|
||||
convertKeyValueEdit();
|
||||
@@ -188,6 +196,7 @@
|
||||
beforeUpload,
|
||||
handleRemove,
|
||||
paramListColumns,
|
||||
isFileType,
|
||||
// 父组件调用
|
||||
getSelectedRowKeys,
|
||||
// 多行编辑
|
||||
|
||||
@@ -6,44 +6,36 @@ let routers = [
|
||||
path: '/',
|
||||
name: '主页',
|
||||
component: () => import('./components/layouts/GlobalLayout.vue'),
|
||||
redirect: '/doc/info',
|
||||
redirect: '/manage',
|
||||
children: [
|
||||
{
|
||||
path: '/doc',
|
||||
name: '系统配置',
|
||||
name: '文档管理',
|
||||
component: PageLayout,
|
||||
children: [
|
||||
{
|
||||
path: '/doc/info',
|
||||
name: '文档信息',
|
||||
meta: {
|
||||
icon: 'InfoCircleOutlined',
|
||||
},
|
||||
component: () => import('./views/doc/DocInfo.vue')
|
||||
},
|
||||
{
|
||||
path: '/doc/manage',
|
||||
path: '/manage',
|
||||
name: '文档地址管理',
|
||||
meta: {
|
||||
icon: 'FileTextOutlined'
|
||||
},
|
||||
component: () => import('./views/doc/DocManage.vue')
|
||||
component: () => import('./views/manage/DocManage.vue')
|
||||
},
|
||||
{
|
||||
path: '/doc/setting',
|
||||
name: '系统配置',
|
||||
path: '/setting',
|
||||
name: '系统设置',
|
||||
meta: {
|
||||
icon: 'SettingOutlined'
|
||||
},
|
||||
component: EmptyKeepAliveLayout,
|
||||
children: [
|
||||
{
|
||||
path: '/doc/setting/globalParam',
|
||||
path: '/setting/globalParam',
|
||||
name: '全局参数',
|
||||
component: () => import('./views/doc/GlobalParam.vue')
|
||||
component: () => import('./views/manage/GlobalParam.vue')
|
||||
},
|
||||
{
|
||||
path: '/doc/setting/view',
|
||||
path: '/setting/view',
|
||||
name: '展示配置',
|
||||
meta: {
|
||||
hidden: true,
|
||||
@@ -52,21 +44,42 @@ let routers = [
|
||||
},
|
||||
]
|
||||
},
|
||||
// 以下是隐藏的菜单路由
|
||||
{
|
||||
path: '/doc/view',
|
||||
name: '文档展示',
|
||||
path: '/swagger',
|
||||
name: 'swagger文档',
|
||||
meta: {
|
||||
hidden: true,
|
||||
icon: 'SettingOutlined'
|
||||
},
|
||||
component: () => import('./views/doc/DocView.vue')
|
||||
component: EmptyKeepAliveLayout,
|
||||
children: [
|
||||
{
|
||||
path: '/swagger/info',
|
||||
name: '文档信息',
|
||||
component: () => import('./views/swagger/DocInfo.vue')
|
||||
},
|
||||
{
|
||||
path: '/swagger/view',
|
||||
name: '文档展示',
|
||||
component: () => import('./views/swagger/DocView.vue')
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/doc/apiRequest',
|
||||
name: '接口请求',
|
||||
path: '/api',
|
||||
name: 'API请求',
|
||||
meta: {
|
||||
hidden: true,
|
||||
},
|
||||
component: () => import('./views/apiRequest/ApiRequest.vue')
|
||||
component: EmptyKeepAliveLayout,
|
||||
children: [
|
||||
{
|
||||
path: '/api/request',
|
||||
name: '接口请求',
|
||||
component: () => import('./views/apiRequest/ApiRequest.vue')
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1,58 +1,56 @@
|
||||
<template>
|
||||
<a-card>
|
||||
<a-form layout="inline" style="margin-bottom: 20px;">
|
||||
<a-form-item label="文档类型">
|
||||
<a-select placeholder="请选择文档类型" v-model:value="searchParam.docType" style="width: 150px;">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option :value="1">URL添加</a-select-option>
|
||||
<a-select-option :value="2">JSON内容</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="开放访问">
|
||||
<a-select placeholder="请选择开放访问" v-model:value="searchParam.openVisit" style="width: 150px;">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option :value="0">否</a-select-option>
|
||||
<a-select-option :value="1">是</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="状态">
|
||||
<a-select placeholder="请选择状态" v-model:value="searchParam.docStatus" style="width: 150px;">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option :value="1">启用</a-select-option>
|
||||
<a-select-option :value="2">禁用</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-button @click="searchDocList" type="primary">查询</a-button>
|
||||
<a-button @click="openNewDoc" :style="{ marginLeft: '8px' }">新建</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<a-table :dataSource="docList" :columns="docListColumns" size="middle"
|
||||
:loading="docListLoading" :pagination="false"
|
||||
:scroll="{ x: 1400, y: 'calc(100vh - 340px)' }">
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template v-if="column.dataIndex === 'operation'">
|
||||
<a-button type="link" @click="editDoc(record)">编辑</a-button>
|
||||
<a-popconfirm title="确定要删除吗?" @confirm="deleteDoc(record)">
|
||||
<a-button type="link" danger>删除</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'docType'">
|
||||
<a-tag color="red" v-if="text === 1">URL添加</a-tag>
|
||||
<a-tag color="blue" v-else-if="text === 2">JSON内容</a-tag>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'openVisit'">
|
||||
<a-tag color="pink" v-if="text === 0">未开放</a-tag>
|
||||
<a-tag color="green" v-else-if="text === 1">已开放</a-tag>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'docStatus'">
|
||||
<a-tag color="green" v-if="text === 1">启用</a-tag>
|
||||
<a-tag color="pink" v-else-if="text === 2">禁用</a-tag>
|
||||
</template>
|
||||
<a-form layout="inline" style="margin-bottom: 20px;">
|
||||
<a-form-item label="文档类型">
|
||||
<a-select placeholder="请选择文档类型" v-model:value="searchParam.docType" style="width: 150px;">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option :value="1">URL添加</a-select-option>
|
||||
<a-select-option :value="2">JSON内容</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="开放访问">
|
||||
<a-select placeholder="请选择开放访问" v-model:value="searchParam.openVisit" style="width: 150px;">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option :value="0">否</a-select-option>
|
||||
<a-select-option :value="1">是</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="状态">
|
||||
<a-select placeholder="请选择状态" v-model:value="searchParam.docStatus" style="width: 150px;">
|
||||
<a-select-option value="">全部</a-select-option>
|
||||
<a-select-option :value="1">启用</a-select-option>
|
||||
<a-select-option :value="2">禁用</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-button @click="searchDocList" type="primary">查询</a-button>
|
||||
<a-button @click="openNewDoc" :style="{ marginLeft: '8px' }">新建</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<a-table :dataSource="docList" :columns="docListColumns" size="middle"
|
||||
:loading="docListLoading" :pagination="false"
|
||||
:scroll="{ x: 1400, y: 'calc(100vh - 300px)' }">
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template v-if="column.dataIndex === 'operation'">
|
||||
<a-button type="link" @click="editDoc(record)">编辑</a-button>
|
||||
<a-popconfirm title="确定要删除吗?" @confirm="deleteDoc(record)">
|
||||
<a-button type="link" danger>删除</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
<a-modal v-model:visible="newDocVisible" title="新增文档" @ok="handleNewDocOk" :width="600">
|
||||
<template v-if="column.dataIndex === 'docType'">
|
||||
<a-tag color="red" v-if="text === 1">URL添加</a-tag>
|
||||
<a-tag color="blue" v-else-if="text === 2">JSON内容</a-tag>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'openVisit'">
|
||||
<a-tag color="pink" v-if="text === 0">未开放</a-tag>
|
||||
<a-tag color="green" v-else-if="text === 1">已开放</a-tag>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'docStatus'">
|
||||
<a-tag color="green" v-if="text === 1">启用</a-tag>
|
||||
<a-tag color="pink" v-else-if="text === 2">禁用</a-tag>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
<a-modal v-model:visible="newDocVisible" :title="docEdit.isNew?'新增文档':'编辑文档'" @ok="handleNewDocOk" :width="600">
|
||||
<a-form layout="horizontal" ref="newDocFormRef" :rules="newDocRules" :model="docEdit" :label-col="{span: 6}" :wrapper-col="{span: 18}">
|
||||
<a-form-item label="文档名称" required name="name">
|
||||
<a-input placeholder="请输入文档名称" v-model:value="docEdit.name"></a-input>
|
||||
@@ -105,12 +103,12 @@
|
||||
</a-popover>
|
||||
</template>
|
||||
</a-form-item>
|
||||
<a-form-item label="开放访问" required name="openVisit">
|
||||
<a-radio-group v-model:value="docEdit.openVisit">
|
||||
<a-radio :value="0">否</a-radio>
|
||||
<a-radio :value="1">开放</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<!-- <a-form-item label="开放访问" required name="openVisit">-->
|
||||
<!-- <a-radio-group v-model:value="docEdit.openVisit">-->
|
||||
<!-- <a-radio :value="0">否</a-radio>-->
|
||||
<!-- <a-radio :value="1">开放</a-radio>-->
|
||||
<!-- </a-radio-group>-->
|
||||
<!-- </a-form-item>-->
|
||||
<a-form-item label="状态" required name="docStatus">
|
||||
<a-radio-group v-model:value="docEdit.docStatus">
|
||||
<a-radio :value="1">启用</a-radio>
|
||||
@@ -156,7 +154,7 @@
|
||||
const openNewDoc = async () => {
|
||||
newDocVisible.value = true;
|
||||
docEdit.value = {
|
||||
docType: 1, openVisit: 0, docStatus: 1,
|
||||
docType: 1, openVisit: 0, docStatus: 1, isNew: 1
|
||||
};
|
||||
};
|
||||
const editDoc = (record) => {
|
||||
@@ -3,16 +3,16 @@
|
||||
<a-button @click="searchDocList" type="primary">刷新</a-button>
|
||||
<a-button @click="addDocLine">新建</a-button>
|
||||
</div>
|
||||
<a-table :dataSource="docList" :columns="docListColumns" size="middle"
|
||||
<a-table :dataSource="docList" :columns="docListColumns" size="middle" id="paramTable"
|
||||
:loading="docListLoading" :pagination="false"
|
||||
:scroll="{ x: 1000, y: 'calc(100vh - 340px)' }">
|
||||
:scroll="{ x: 1000, y: 'calc(100vh - 240px)' }">
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template v-if="column.dataIndex === 'paramKey'">
|
||||
<a-input v-if="record.isEdit" placeholder="请输入参数名称" v-model:value="docEdit.paramKey"></a-input>
|
||||
<span v-else>{{text}}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'paramValue'">
|
||||
<a-textarea v-if="record.isEdit" :rows="1" placeholder="请输入参数值" v-model:value="docEdit.paramValue"></a-textarea>
|
||||
<a-input v-if="record.isEdit" :rows="1" placeholder="请输入参数值" v-model:value="docEdit.paramValue"></a-input>
|
||||
<span v-else>{{text}}</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'paramType'">
|
||||
@@ -66,13 +66,19 @@
|
||||
});
|
||||
};
|
||||
let docEdit = ref({});
|
||||
let tableRef = ref();
|
||||
const addDocLine = () => {
|
||||
if (docEdit.value.isEdit) {
|
||||
cancelEditDoc(docEdit.value);
|
||||
}
|
||||
let newLine = {isEdit: true};
|
||||
docList.value.push(newLine);
|
||||
docList.value.unshift(newLine);
|
||||
docEdit.value = newLine;
|
||||
// 渲染完滚动到底部
|
||||
setTimeout(() => {
|
||||
let container = document.getElementsByClassName('ant-table-body')[0];
|
||||
container.scrollTop = 0;
|
||||
}, 0);
|
||||
};
|
||||
const editDoc = (record) => {
|
||||
if (docEdit.value.isEdit) {
|
||||
@@ -108,6 +114,7 @@
|
||||
docList,
|
||||
docListLoading,
|
||||
docEdit,
|
||||
tableRef,
|
||||
searchDocList,
|
||||
deleteDoc,
|
||||
editDoc,
|
||||
Reference in New Issue
Block a user