mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-23 05:40:20 +08:00
feat: 接口文档生成
This commit is contained in:
parent
31c2ac8968
commit
7c5152857d
@ -1,5 +1,5 @@
|
||||
export default {
|
||||
datasourceconf: {
|
||||
datasourceconf: {
|
||||
index: 'index',
|
||||
importDatasourceConfTip: ' import DatasourceConf',
|
||||
id: 'id',
|
||||
@ -7,6 +7,7 @@ export default {
|
||||
url: 'url',
|
||||
username: 'username',
|
||||
password: 'password',
|
||||
docBtn: 'doc',
|
||||
createTime: 'createTime',
|
||||
updateTime: 'updateTime',
|
||||
delFlag: 'delFlag',
|
||||
|
@ -1,5 +1,5 @@
|
||||
export default {
|
||||
datasourceconf: {
|
||||
datasourceconf: {
|
||||
index: '序号',
|
||||
importDatasourceConfTip: '导入数据源',
|
||||
id: '主键',
|
||||
@ -7,6 +7,7 @@ export default {
|
||||
url: 'jdbcurl',
|
||||
username: '用户名',
|
||||
password: '密码',
|
||||
docBtn: '文档',
|
||||
createTime: '创建时间',
|
||||
updateTime: '更新',
|
||||
delFlag: '删除标记',
|
||||
@ -17,20 +18,20 @@ export default {
|
||||
instance: '实例',
|
||||
port: '端口',
|
||||
host: '主机',
|
||||
inputidTip: '请输入主键',
|
||||
inputnameTip: '请输入别名',
|
||||
inputurlTip: '请输入jdbcurl',
|
||||
inputusernameTip: '请输入用户名',
|
||||
inputpasswordTip: '请输入密码',
|
||||
inputcreateTimeTip: '请输入创建时间',
|
||||
inputupdateTimeTip: '请输入更新',
|
||||
inputdelFlagTip: '请输入删除标记',
|
||||
inputtenantIdTip: '请输入租户ID',
|
||||
inputdsTypeTip: '请输入数据库类型',
|
||||
inputconfTypeTip: '请输入配置类型',
|
||||
inputdsNameTip: '请输入数据库名称',
|
||||
inputinstanceTip: '请输入实例',
|
||||
inputportTip: '请输入端口',
|
||||
inputhostTip: '请输入主机',
|
||||
inputidTip: '请输入主键',
|
||||
inputnameTip: '请输入别名',
|
||||
inputurlTip: '请输入jdbcurl',
|
||||
inputusernameTip: '请输入用户名',
|
||||
inputpasswordTip: '请输入密码',
|
||||
inputcreateTimeTip: '请输入创建时间',
|
||||
inputupdateTimeTip: '请输入更新',
|
||||
inputdelFlagTip: '请输入删除标记',
|
||||
inputtenantIdTip: '请输入租户ID',
|
||||
inputdsTypeTip: '请输入数据库类型',
|
||||
inputconfTypeTip: '请输入配置类型',
|
||||
inputdsNameTip: '请输入数据库名称',
|
||||
inputinstanceTip: '请输入实例',
|
||||
inputportTip: '请输入端口',
|
||||
inputhostTip: '请输入主机',
|
||||
}
|
||||
}
|
||||
|
@ -20,11 +20,7 @@
|
||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()">
|
||||
{{ $t('common.addBtn') }}
|
||||
</el-button>
|
||||
<el-button icon="upload-filled" type="primary" class="ml10" @click="excelUploadRef.show()">
|
||||
{{ $t('common.importBtn') }}
|
||||
</el-button>
|
||||
<el-button :disabled="multiple" icon="Delete" type="primary" class="ml10"
|
||||
@click="handleDelete(undefined)">
|
||||
<el-button :disabled="multiple" icon="Delete" type="primary" class="ml10" @click="handleDelete(undefined)">
|
||||
{{ $t('common.delBtn') }}
|
||||
</el-button>
|
||||
<right-toolbar v-model:showSearch="showSearch" class="ml10" style="float: right;margin-right: 20px"
|
||||
@ -42,6 +38,11 @@
|
||||
<el-table-column prop="createTime" :label="t('datasourceconf.createTime')" show-overflow-tooltip />
|
||||
<el-table-column :label="$t('common.action')" width="150">
|
||||
<template #default="scope">
|
||||
|
||||
<el-button text type="primary" @click="downloadDoc(scope.row.name)">{{
|
||||
$t('datasourceconf.docBtn')
|
||||
}}</el-button>
|
||||
|
||||
<el-button text type="primary" @click="formDialogRef.openDialog(scope.row.id)">{{
|
||||
$t('common.editBtn')
|
||||
}}</el-button>
|
||||
@ -65,6 +66,7 @@ import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { fetchList, delObj } from "/@/api/gen/datasource";
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { downBlobFile } from "/@/utils/other";
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
@ -72,7 +74,6 @@ const { t } = useI18n()
|
||||
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
const excelUploadRef = ref()
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
@ -93,6 +94,10 @@ const {
|
||||
} = useTable(state)
|
||||
|
||||
|
||||
const downloadDoc = (dsName: string) => {
|
||||
downBlobFile('/gen/dsconf/doc', { dsName }, `${dsName}.html`)
|
||||
}
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
queryRef.value.resetFields()
|
||||
|
Loading…
Reference in New Issue
Block a user