Commit a392d3ea authored by 张伯涛's avatar 张伯涛

主体管理

parent 266dd612
......@@ -59,6 +59,29 @@ export const DictRoute: AppRouteRecordRaw = {
},
],
};
export const mainBodyRoute: AppRouteRecordRaw = {
path: '/mainBody',
name: 'mainBody',
component: LAYOUT,
meta: {
title: '主体管理',
icon: '',
hidden: true,
currentActiveMenu: '/mainBody/index',
},
children: [
{
path: '/mainBody/details',
name: 'details',
component: () => import('@/views/mainBody/details/index.vue'),
meta: {
title: '主体管理详情',
icon: '',
},
},
],
};
export const UserRoute: AppRouteRecordRaw = {
path: '/user',
......@@ -214,6 +237,7 @@ export const WorkSpaceRoute: AppRouteRecordRaw = {
export const basicRoutes = [
LoginRoute,
DictRoute,
mainBodyRoute,
UserRoute,
WorkSpaceRoute,
CommonFileRoute,
......
<template>
<div class="mainBody_details">
<div class="title">
<div class="title_left">
<div>
<Icon icon="ant-design:database-outlined" :size="32" :color="'#C636D4'" />
</div>
<div style="padding-left: 10px">
<div class="name">各城市各车型用户下单流水表</div>
<div>主体管理 / 指标工作区 /各城市各车型用户下单流水表</div>
</div>
</div>
<div class="title_right">
<div class="item">
<Icon icon="ant-design:reload-outlined" :size="28" :color="'#068CFF'" />
<div class="name">手动更新</div>
</div>
<div class="item">
<Icon icon="ant-design:setting-outlined" :size="28" :color="'#068CFF'" />
<div class="name">基本信息</div>
</div>
<div class="item">
<Icon icon="ant-design:save-outlined" :size="28" :color="'#068CFF'" />
<div class="name">保存</div>
</div>
</div>
</div>
<Tabs default-active-key="1">
<Tabs.TabPane key="1" tab="主体配置">
aaaaaaaaa
</Tabs.TabPane>
<Tabs.TabPane key="2" tab="引用关系">
<referenceRelationship/>
bbbbbbbbbbbbb
</Tabs.TabPane>
</Tabs>
</div>
</template>
<script lang="ts" setup>
import Icon from '@/components/Icon/Icon.vue';
import { Card, Col, Row, Space, message,Tabs,Badge } from 'ant-design-vue';
import referenceRelationship from './referenceRelationship/index.vue';
</script>
<style scoped lang="scss">
.mainBody_details{
padding: 20px;
.title{
display: flex;
align-items: center;
justify-content: space-between;
.title_left{
display: flex;
align-items: center;
justify-content: space-between;
.name{
font-weight: 600;
font-size: 17px;
padding-bottom: 5px;
}
}
.title_right{
display: flex;
align-items: center;
justify-content: space-between;
.item{
width: 100px;
text-align: center;
}
}
}
}
</style>
<template>
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
<BasicTable @register="registerTable" :searchInfo="searchInfo" :rowSelection="rowSelection">
</BasicTable>
</PageWrapper>
</template>
<script lang="ts" setup>
import { reactive, onMounted,ref } from 'vue';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import { useMessage } from '@/hooks/web/useMessage';
import { useModal } from '@/components/Modal';
import { columns, searchFormSchema } from './referenceRelationship.data';
import {tableList} from "./mock";
import { useRoute, onBeforeRouteLeave } from 'vue-router';
import { router } from '@/router';
defineOptions({ name: 'safetyLevelManage' });
const { createMessage } = useMessage();
const route = useRoute();
const searchInfo = reactive<Recordable>({});
const [registerTable, { reload, updateTableDataRecord, getSearchInfo, getForm,getRowSelection }] = useTable({
title: '敏感类型',
api: async (params) => {
const response = {
pageNu: "1",
pageSize: "10",
pages: "1",
total: tableList.length,
code:'',
message:'',
data: tableList,
};
return { ...response};
},
columns,
formConfig: {
labelWidth: 10,
schemas: searchFormSchema,
autoSubmitOnEnter: true,
resetFunc: () => {
searchInfo.deptId = '';
},
},
useSearchForm: true,
showTableSetting: false,
bordered: true,
handleSearchInfoFn(info) {
console.log('handleSearchInfoFn', info);
return info;
},
});
onMounted(() => {
});
</script>
export const tableList = [
{
name: 'SLA明细信息',
module: '数据指标',
path: '指标演示工作区/SLA明细信息',
},
{
name: 'SLA明细信息',
module: '数据指标',
path: '指标演示工作区/SLA明细信息',
},
{
name: 'SLA明细信息',
module: '数据指标',
path: '指标演示工作区/SLA明细信息',
},
]
import { getAllRoleList } from '@/api/system/role/role';
import { BasicColumn, FormSchema } from '@/components/Table';
import { h } from 'vue';
import { Switch } from 'ant-design-vue';
import { useMessage } from '@/hooks/web/useMessage';
import { changeFlagApi } from '@/api/system/user/user';
// 引入开关组件
type CheckedType = boolean | string | number;
/** 列表筛选项*/
export const searchFormSchema: FormSchema[] = [
{
field: 'name',
label: ' ',
component: 'Input',
colProps: { span: 4 },
componentProps: {
placeholder: '输入关键字',
},
},
{
field: 'sort',
label: ' ',
component: 'Select',
colProps: { span: 4 },
componentProps: {
placeholder: '模块',
options: [
{ label: '数据指标', value: '数据指标' },
{ label: '质量主体', value: '质量主体' },
],
},
},
];
/** 列表展示字段*/
export const columns: BasicColumn[] = [
{
title: '主体名称',
dataIndex: 'name',
width: 120,
},
{
title: '模块',
dataIndex: 'module',
width: 120,
},
{
title: '路径',
dataIndex: 'path',
width: 120,
},
];
/** 新增编辑表单字段*/
export const formSchema: any[] = [
{
field: 'name',
label: '名称',
component: 'Input',
rules: [
{
required: true,
message: '请输入名称',
},
],
},
{
field: 'describe',
component: 'InputTextArea',
label: '描述',
componentProps: {
placeholder: '请输入描述',
rows: 4,
},
},
{
field: 'sort',
label: '最低安全分级',
component: 'Select',
componentProps: {
options: [
{ label: 'G1', value: 'G1' },
{ label: 'G2', value: 'G2' },
{ label: 'G3', value: 'G3' },
],
},
rules: [
{
required: true,
message: '请选择推荐保护动作',
},
],
},
{
field: 'protectAction',
label: '推荐脱敏算法',
component: 'Select',
componentProps: {
options: [
{ label: 'BlockFront', value: 'BlockFront' },
{ label: 'Delete', value: 'Delete' },
{ label: 'Mask', value: 'Mask' },
{ label: 'Base64', value: 'Base64' },
],
},
rules: [
{
required: true,
message: '请选择推荐保护动作',
},
],
},
{
field: 'params',
label: '算法参数',
component: 'Input',
},
]
......@@ -9,6 +9,9 @@
<a-button type="primary" >新增文件夹</a-button>
<a-button type="primary" >新增主体</a-button>
</template>
<template #name="{ text, record }">
<a @click="showDetails(record)"> {{ text }}</a>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
......@@ -46,6 +49,7 @@
import { useRoute,onBeforeRouteLeave } from 'vue-router';
import { useFilterStore } from '@/store/modules/filterData';
import {useUserStore} from "@/store/modules/user";
import {router} from "@/router";
defineOptions({ name: 'AccountManagement' });
const { createMessage } = useMessage();
const filterStore = useFilterStore();
......@@ -94,25 +98,13 @@
// slots: { customRender: 'action' },
},
});
/** 新增按钮*/
function handleCreate() {
openModal(true, {
isUpdate: false,
});
}
/** 编辑按钮*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
function showDetails(record) {
router.push({
path: '/mainBody/details',
});
}
/** 重置密码按钮*/
function handleResetPassword(record: Recordable) {
openResetPasswordModal(true,{
record
})
}
/** 导入按钮*/
function handleImport() {
openImportModal(true,{
......
......@@ -33,6 +33,7 @@ export const columns: BasicColumn[] = [
title: '主体名称',
dataIndex: 'name',
width: 120,
slots: { customRender: 'name' },
},
{
title: '描述',
......
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