Commit 15526b48 authored by 曹泽华's avatar 曹泽华

数据服务 服务监控-开发者/管理员

parent 49471aac
......@@ -4,10 +4,25 @@
<BasicTable @register="registerTable" class="w-3/4 xl:w-4/5" :searchInfo="searchInfo">
<template #toolbar>
<a-button type="primary" @click="typeManageButton">类别管理</a-button>
<a-button type="primary" :disabled="getRowSelection().selectedRowKeys<=0" @click="exportButton">导出</a-button>
<a-button
type="primary"
:disabled="getRowSelection().selectedRowKeys <= 0"
@click="exportButton"
>导出</a-button
>
<a-button type="primary" @click="importButton">导入</a-button>
<a-button type="primary" :disabled="getRowSelection().selectedRowKeys<=0" @click="copyButton">复制到</a-button>
<a-button type="primary" :disabled="getRowSelection().selectedRowKeys<=0" @click="MoveButton">移动</a-button>
<a-button
type="primary"
:disabled="getRowSelection().selectedRowKeys <= 0"
@click="copyButton"
>复制到</a-button
>
<a-button
type="primary"
:disabled="getRowSelection().selectedRowKeys <= 0"
@click="MoveButton"
>移动</a-button
>
<a-button type="primary" @click="createDocumentButton">新建文件夹</a-button>
<a-button type="primary" @click="createAPIButton">新建API</a-button>
</template>
......@@ -20,12 +35,17 @@
// label: '重命名',
onClick: resetNameButton.bind(null, record),
},
{
icon: 'ant-design:fund-projection-screen-outlined',
// label: '重命名',
onClick: apiMonitorButton.bind(null, record),
},
{
icon: 'eos-icons:api-outlined',
// label: 'api doc',
onClick: apiDocButton.bind(null, record),
},
{
{
icon: 'ant-design:send-outlined',
// label: '发布',
onClick: publishButton.bind(null, record),
......@@ -63,28 +83,28 @@
<a @click="editApi(record)"> {{ text }}</a>
</template>
</BasicTable>
<!-- 新建文件夹 弹窗-->
<!-- 新建文件夹 弹窗-->
<CreateDocument @register="registerCreateDocumentModal" @success="handleSuccess" />
<!-- 新建API 弹窗-->
<!-- 新建API 弹窗-->
<CreateAPI @register="registerCreateAPIModal" @success="handleSuccess" />
<!-- 移动 弹窗-->
<!-- 移动 弹窗-->
<MoveModal @register="registerMoveModal" @success="handleSuccess" />
<!-- 复制到 弹窗-->
<!-- 复制到 弹窗-->
<CopyModal @register="registerCopyModal" @success="handleSuccess" />
<!-- 重命名 弹窗-->
<!-- 重命名 弹窗-->
<ResetNameModal @register="registerResetNameModal" @success="handleSuccess" />
<!-- 版本管理 弹窗-->
<!-- 版本管理 弹窗-->
<VersionModal @register="registerVersionModal" @success="handleSuccess" />
<!-- 导入 弹窗-->
<!-- 导入 弹窗-->
<ImportModal @register="registerImportModal" @success="handleSuccess" />
<!-- 版本发布申请 弹窗-->
<!-- 版本发布申请 弹窗-->
<PublishApplicationModal @register="registerPublishApplicationModal" @success="handleSuccess" />
<!-- 类别管理 弹窗-->
<!-- 类别管理 弹窗-->
<TypeManageModal @register="registerTypeManageModal" @success="handleSuccess" />
</PageWrapper>
</template>
<script lang="ts" setup>
import { reactive,unref,onDeactivated,onMounted,ref } from 'vue';
import { reactive, unref, onDeactivated, onMounted, ref } from 'vue';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import ApiTree from './ApiTree.vue';
......@@ -99,13 +119,13 @@
import { columns, searchFormSchema } from './api.data';
import { useGo } from '@/hooks/web/usePage';
import { useRoute } from 'vue-router';
import { TreeData } from "./apiData";
import { TreeData } from './apiData';
import { router } from '@/router';
import {exportUserList} from "@/api/system/user/user";
import {downloadByData} from "@/utils/file/download";
import ImportModal from './ImportModal.vue'
import PublishApplicationModal from './PublishApplicationModal.vue'
import TypeManageModal from './TypeManageModal.vue'
import { exportUserList } from '@/api/system/user/user';
import { downloadByData } from '@/utils/file/download';
import ImportModal from './ImportModal.vue';
import PublishApplicationModal from './PublishApplicationModal.vue';
import TypeManageModal from './TypeManageModal.vue';
defineOptions({ name: 'AccountManagement' });
const { createMessage, createConfirm } = useMessage();
......@@ -121,30 +141,33 @@
const [registerCopyModal, { openModal: openCopyModal }] = useModal();
const [registerResetNameModal, { openModal: openResetNameModal }] = useModal();
const searchInfo = reactive<Recordable>({});
const tableData = ref([])
const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,getRowSelection }] = useTable({
const tableData = ref([]);
const [
registerTable,
{ reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection },
] = useTable({
title: '',
api: async (params) => {
//过滤掉tableData.value中,businessId等于100的
var data = [];
if (params.taskId == undefined || params.taskId == ''){
if (params.taskId == undefined || params.taskId == '') {
data = tableData.value.filter((item) => item.businessId >= 200);
}else if (params.taskId >= 200){
} else if (params.taskId >= 200) {
data = tableData.value.filter((item) => item.businessId == params.taskId);
}else {
} else {
data = tableData.value.filter((item) => item.parentId == params.taskId);
}
const response = {
pageNu: "1",
pageSize: "10",
pages: "1",
pageNu: '1',
pageSize: '10',
pages: '1',
total: data.length,
code:'',
message:'',
code: '',
message: '',
data: [],
};
//过滤data中的数据,取出等于params.deptId的数据
return { ...response,data: data };
return { ...response, data: data };
},
rowKey: 'businessId',
columns,
......@@ -154,92 +177,85 @@
schemas: searchFormSchema,
autoSubmitOnEnter: true,
resetFunc: () => {
searchInfo.taskId=''
searchInfo.taskId = '';
},
},
useSearchForm: true,
showTableSetting: false,
showIndexColumn:false,
showIndexColumn: false,
bordered: true,
handleSearchInfoFn(info) {
return info;
},
actionColumn: {
width: 250,
width: 300,
title: '操作',
dataIndex: 'action',
},
});
/**类别管理 按钮*/
function typeManageButton() {
openTypeManageModal(true, {
});
openTypeManageModal(true, {});
}
/**版本管理 按钮*/
function versionButton() {
openVersionModal(true, {
});
openVersionModal(true, {});
}
/**复制到 按钮*/
function copyButton() {
openCopyModal(true, {
});
openCopyModal(true, {});
}
/**导入*/
function importButton() {
openImportModal(true, {
});
openImportModal(true, {});
}
/**重命名 按钮*/
function resetNameButton(record) {
openResetNameModal(true, {
record
record,
});
}
/**查看API监控信息 按钮*/
function apiMonitorButton(record) {
router.push({
path: '/dataService/serviceMonitor/monitorInfo',
query: {},
});
}
/**发布 按钮*/
function publishButton(record) {
openPublishApplicationModal(true,{
record
})
openPublishApplicationModal(true, {
record,
});
}
/**编辑API*/
function editApi(record) {
const mode = record.mode
if (mode === '向导模式'){
const mode = record.mode;
if (mode === '向导模式') {
router.push({
path: '/dataService/serviceDevelopment/guideModeApi',
query: {
}
})
query: {},
});
}
if (mode === 'SQL模式'){
router.push({
if (mode === 'SQL模式') {
router.push({
path: '/dataService/serviceDevelopment/sqlModeApi',
query: {
}
})
query: {},
});
}
if (mode === '托管模式'){
router.push({
if (mode === '托管模式') {
router.push({
path: '/dataService/serviceDevelopment/trusteeshipModeApi',
query: {
}
})
query: {},
});
}
}
......@@ -247,18 +263,13 @@
function apiDocButton(record) {
router.push({
path: '/dataService/serviceDevelopment/ApiDoc',
query: {
},
})
query: {},
});
}
/**复制到 按钮*/
function copyButton1() {
openCopyModal(true, {
});
openCopyModal(true, {});
}
/**查看详情*/
......@@ -266,19 +277,16 @@
router.push({
path: '/dataStandards/publicCode/detailPublicCode',
query: {
businessId:record.businessId,
businessId: record.businessId,
},
});
}
/**移动*/
function MoveButton() {
openMoveModal(true, {
});
openMoveModal(true, {});
}
/**删除按钮*/
function deleteButton() {
createMessage.success('删除成功!');
......@@ -286,16 +294,12 @@
/**新建文件夹*/
function createDocumentButton() {
openCreateDocumentModal(true, {
});
openCreateDocumentModal(true, {});
}
/**新建API*/
function createAPIButton() {
openCreateAPIModal(true, {
});
openCreateAPIModal(true, {});
}
/**导出 按钮*/
......@@ -305,10 +309,7 @@
downloadByData(data, 'API信息' + '.xlsx');
}
function handleSuccess({ isUpdate, values }) {
}
function handleSuccess({ isUpdate, values }) {}
/** 树的select*/
function handleSelect(taskId = '') {
......@@ -321,12 +322,12 @@
router.push({
path: '/dataStandards/publicCode/relatedRelationships',
query: {
businessId:record.businessId,
businessId: record.businessId,
},
});
}
onMounted(() => {
tableData.value = TreeData
tableData.value = TreeData;
});
</script>
......@@ -82,7 +82,7 @@
const APIRate = ref('375');
const [
registerTable,
{ reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection },
{ reload, updateTableDataRecord, setTableData, getSearchInfo, getForm, getRowSelection },
] = useTable({
title: '执行中请求',
scroll: { y: 500 },
......@@ -127,27 +127,12 @@
},
});
function handleImport() {
openImportModal(true, {});
}
function handleLog() {
router.push({
path: '/dataService/serviceMonitor/useLog',
});
}
function handleDeleteIds() {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '确认批量删除选中数据吗?',
onOk() {
createMessage.success('批量删除成功!');
},
});
}
/** 部门树的select*/
function handleSelect(key) {
if (key !== null && key !== undefined) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment