Commit ae121f9e authored by 罗林杰's avatar 罗林杰

Merge remote-tracking branch 'origin/master'

parents 9370f5da f9b42ea1
<template>
<Card :loading="loading">
<div class="centent1">
我的流程
</div>
<div class="centent1"> 我的流程 </div>
<div class="centent2">
<div style="display: flex;justify-content: center;width:100%">
<div style="margin-left: 18%">我发起的</div>
<div style="margin-left: 30%">我的代办</div>
</div>
<div style="display: flex;justify-content: center;">
<div style="display: flex; justify-content: center">
<template v-for="(item, index) in CardList2" :key="item.title">
<div>
<div style="margin-bottom: 5px"
><div v-if="index === 1" style="padding-left: 22px">我发起的</div>
<div v-else-if="index === 3" style="padding-left: 22px">我的代办</div>
<div v-else>&nbsp;</div>
</div>
<Card
size="small"
:loading="loading"
hoverable="true"
class="md:w-25 w-full !md:mt-0 h-25 md:h-25"
:class="[{ 'md:mr-4': index + 1 < 4, 'mt-4': index > 0,'bg-color':(index % 4) + 1 },`bg-color-${(index % 4) + 1}`]"
:class="[
{ 'md:mr-4': index + 1 < 4, 'mt-4': index > 0, 'bg-color': (index % 4) + 1 },
`bg-color-${(index % 4) + 1}`,
]"
>
<div :class="`centent2-1`" class="md:h-20">
<div>
<span class="centent2-1-1">{{item.total}}</span>
<span>{{item.title}}</span>
<span class="centent2-1-1">{{ item.total }}</span>
<span>{{ item.title }}</span>
</div>
</div>
</Card>
<Divider v-if="index === 2" :class="`centent2-2`" type="vertical" class="md:h-25" />
</div>
<Divider v-if="index === 2" :class="`centent2-2`" type="vertical" class="md:h-35" />
</template>
</div>
</div>
......@@ -33,12 +37,17 @@
<List.Item class="centent3" @click="">
<List.Item.Meta class="centent3-1">
<template #avatar>
<Icon style="font-size: 20px" v-if="item.icon" :icon="item.icon" :color="item.color" />
<Icon
style="font-size: 20px"
v-if="item.icon"
:icon="item.icon"
:color="item.color"
/>
</template>
<template #title>
<div class="centent3-1-1">
<span>{{ item.title }}</span>
<span style="color:rgb(161, 161, 161);">当前审批人: {{item.approver}}</span>
<span style="color: rgb(161, 161, 161)">当前审批人: {{ item.approver }}</span>
</div>
</template>
<template #description>
......@@ -54,52 +63,52 @@
</Card>
</template>
<script lang="ts" setup>
import { Tag, Card,Select,List,Divider } from 'ant-design-vue';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import {ListData, TableData2,CardList2} from "./overviewMallResourceData";
import {columns2} from "./overviewMallResource.data";
import { ref } from 'vue';
import Icon from '@/components/Icon/Icon.vue';
import { Tag, Card, Select, List, Divider } from 'ant-design-vue';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { ListData, TableData2, CardList2 } from './overviewMallResourceData';
import { columns2 } from './overviewMallResource.data';
import { ref } from 'vue';
import Icon from '@/components/Icon/Icon.vue';
const dataList = ref(ListData)
const dataList = ref(ListData);
</script>
<style lang="less" scoped>
.centent2{
.centent2-1{
.centent2 {
.centent2-1 {
display: flex;
align-items: center;
justify-content: center;
.centent2-1-1{
display:flex;
.centent2-1-1 {
display: flex;
justify-content: center;
align-items: center;
font-size: 20px;
}
}
.centent2-2{
.centent2-2 {
margin-right: 20px;
border:1px solid rgb(240, 242, 243);
border: 1px solid rgb(240, 242, 243);
}
}
}
.centent1{
.centent1 {
display: flex;
margin-bottom: 10px;
font-weight: bold;
}
.centent3{
}
.centent3 {
background-color: rgb(250, 251, 252);
margin-top: 10px;
.centent3-1{
.centent3-1 {
display: flex !important;
align-items: center !important;
.centent3-1-1{
.centent3-1-1 {
display: flex;
justify-content: space-between;
}
.centent3-1-2{
.centent3-1-2 {
display: flex;
justify-content: space-between;
}
}
}
}
</style>
......@@ -5,7 +5,7 @@ export const columns: BasicColumn[] = [
title: '名称',
dataIndex: 'name',
width: 120,
// slots: { customRender: 'name' },
slots: { customRender: 'name' },
},
{
title: '场景',
......
......@@ -72,8 +72,17 @@
<a-button @click="handleGetMetadata" type="primary">获取元数据</a-button>
</template>
<template #importFile>
<div style="display: flex">
<a-button style="margin-right: 5px">下载文件模板</a-button>
<a-button type="primary">导入文件</a-button>
<!-- <a-button type="primary">导入文件</a-button>-->
<BasicUpload
:maxSize="20"
:maxNumber="1"
@change="handleChange"
:api="userImport"
:accept="['.xlsx, .xls']"
/>
</div>
</template>
</BasicForm>
<div v-if="isGetMeta === 'true'" style="width: 20%">
......@@ -549,10 +558,12 @@
tabularPresentationTableList,
compareTableList,
} from './mock';
import { userImport } from '@/api/system/user/user';
import { router } from '@/router';
import { DeleteOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { useModal } from '@/components/Modal';
import { BasicUpload } from '@/components/Upload';
import GetMetadataModal from '@/views/dataIntegration/dataLoading/dataEntryLake/getMetadataModal.vue';
import DeplysModal from '@/views/dataIntegration/dataLoading/dataEntryLake/DeplysModal.vue';
import CodeEditor from '@/components/CodeEditor/src/CodeEditor.vue';
......@@ -1163,7 +1174,7 @@
placeholder: '',
options: [
{ label: 'ORC', value: 'ORC' },
{ label: 'TORC', value: 'ORC' },
{ label: 'TORC', value: 'TORC' },
{ label: 'Text', value: 'Text' },
],
},
......@@ -1770,6 +1781,11 @@
router.back();
}
function handleChange(list: string[]) {
console.log('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', list);
createMessage.success(`文件上传成功`);
}
function handleDebug() {
isEdit.value = 'debug';
key.value = '4';
......@@ -1951,9 +1967,17 @@
}
function handleDeleteRules() {
createMessage.success(
'批量删除成功!' + getMappingRuleConfigurationRowSelection().selectedRowKeys,
);
// createMessage.success(
// '批量删除成功!' + getMappingRuleConfigurationRowSelection().selectedRowKeys,
// );
createConfirm({
iconType: 'warning',
title: '删除规则',
content: '是否确认删除规则?',
onOk() {
createMessage.success('批量删除成功!');
},
});
}
function handleMoveTop(source) {
......
......@@ -81,6 +81,9 @@
/>
</template>
</template>
<template #name="{ text, record }">
<a @click="handleDetails(record)">{{ text }}</a>
</template>
</BasicTable>
<MoveFile @register="registerMoveFile" @success="handleMoveSuccess" />
<ImportModal @register="registerImport" @success="handleImportSuccess" />
......@@ -90,7 +93,7 @@
</PageWrapper>
</template>
<script lang="ts" setup>
import { onMounted } from 'vue';
import { onMounted, ref } from 'vue';
import { BasicTable, useTable, TableAction } from '@/components/Table';
import { PageWrapper } from '@/components/Page';
import { useMessage } from '@/hooks/web/useMessage';
......@@ -210,7 +213,7 @@
});
}
/**发布按钮*/
function handlePublish() {
function handlePublish(record) {
createConfirm({
iconType: 'warning',
title: '确认发布',
......@@ -273,6 +276,32 @@
});
}
function handleDetails(record) {
console.log(record);
let scene = ref('');
switch (record.scene) {
case '离线加载':
scene.value = 'databaseOfflineLoading';
break;
case '文件加载':
scene.value = 'fileOfflineLoading';
break;
case '准实时加载':
scene.value = 'dataDischargeLake';
break;
case '数据出湖':
scene.value = '';
break;
default:
}
router.push({
path: '/dataIntegration/dataLoading/dataEntryLake/' + scene.value,
query: {
isEdit: true,
},
});
}
/** 移动*/
function handleMoveSuccess({ isMove, values }) {
const rowSelection = getRowSelection().selectedRowKeys;
......
......@@ -197,19 +197,19 @@ export const cardList = [
description: '支持将文件定期加载入数据仓库中',
},
{
title: '非结构化数据离线加载',
title: '非结构化数据加载',
scene: 'dataDischargeLake',
icon: 'mdi:database-clock',
color: '#9064e9',
description: '支持将NoSQL(mongodb)类型数据库数据加载到数据仓库中',
},
{
title: '数据库到文件',
scene: 'databaseOfflineLoading',
icon: 'icon-park-solid:data-switching',
color: '#9064e9',
description: '支持数仓的数据库数据定期卸载到指定文件系统的文件夹',
},
// {
// title: '数据库到文件',
// scene: 'databaseOfflineLoading',
// icon: 'icon-park-solid:data-switching',
// color: '#9064e9',
// description: '支持数仓的数据库数据定期卸载到指定文件系统的文件夹',
// },
];
export const cardRuleList = [
......
......@@ -183,12 +183,12 @@ export const fieldNameMappingRuleColumns: BasicColumn[] = [
export const batchScaleNameMappingColumns: BasicColumn[] = [
{
title: '源表名',
dataIndex: 'tableName',
dataIndex: 'fieldName',
labelWidth: 160,
},
{
title: '目标表名',
dataIndex: 'targetTableName',
dataIndex: 'targetFieldName',
},
];
......
......@@ -27,12 +27,7 @@
@click="handlePublish"
>发布</a-button
>
<a-button
type="primary"
:disabled="getRowSelection().selectedRowKeys <= 0"
@click="handleBaseImport"
>从元数据导入</a-button
>
<a-button type="primary" @click="handleBaseImport">从元数据导入</a-button>
<a-button type="primary" :disabled="getRowSelection().selectedRowKeys <= 0">导出</a-button>
<a-button type="primary" @click="handleImport">导入</a-button>
<a-button type="primary" @click="handleCreateFolder">新建文件夹</a-button>
......@@ -99,10 +94,7 @@
import { useGo } from '@/hooks/web/usePage';
import { useRoute, onBeforeRouteLeave, useRouter } from 'vue-router';
import { useFilterStore } from '@/store/modules/filterData';
import {
TreesData,
TreeSystem
} from '@/views/dataWarehousePlanning/physicalModel/modelData';
import { TreesData, TreeSystem } from '@/views/dataWarehousePlanning/physicalModel/modelData';
import ModelTree from '@/views/dataWarehousePlanning/physicalModel/ModelTree.vue';
import RadioButtonGroup from '@/components/Form/src/components/RadioButtonGroup.vue';
import ModelMoreCreate from '@/views/dataWarehousePlanning/physicalModel/modelDetail/modelMoreCreate.vue';
......
......@@ -10,24 +10,24 @@
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import {physicalModelAdd } from './model.data';
import { useMessage } from '@/hooks/web/useMessage';
import { TreeData } from '@/views/dataWarehousePlanning/physicalModel/modelData';
import { router } from '@/router';
import { ref, computed, unref } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { physicalModelAdd } from './model.data';
import { useMessage } from '@/hooks/web/useMessage';
import { TreeData } from '@/views/dataWarehousePlanning/physicalModel/modelData';
import { router } from '@/router';
defineOptions({ name: 'ModelAdd' });
defineOptions({ name: 'ModelAdd' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const isMove = ref(false);
const rowId = ref('');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const isMove = ref(false);
const rowId = ref('');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: physicalModelAdd,
......@@ -35,9 +35,9 @@ const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] =
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
......@@ -61,11 +61,11 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
},
},
]);
});
});
const getTitle = computed(() => '新建文件夹');
const getTitle = computed(() => '新建文件夹');
function handleTree(data, id, parentId, children, rootId) {
function handleTree(data, id, parentId, children, rootId) {
id = id || 'id';
parentId = parentId || 'parentId';
children = children || 'children';
......@@ -79,30 +79,27 @@ function handleTree(data, id, parentId, children, rootId) {
) ||
0;
// 对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data))
const cloneData = JSON.parse(JSON.stringify(data));
// 循环所有项
const treeData = cloneData.filter(father => {
const branchArr = cloneData.filter(child => {
const treeData = cloneData.filter((father) => {
const branchArr = cloneData.filter((child) => {
// 返回每一项的子级数组
return father[id] === child[parentId]
})
branchArr.length > 0 ? father.children = branchArr : ''
return father[id] === child[parentId];
});
branchArr.length > 0 ? (father.children = branchArr) : '';
// 返回第一层
return father[parentId] === rootId
})
return treeData !== '' ? treeData : data
}
return father[parentId] === rootId;
});
return treeData !== '' ? treeData : data;
}
/**确定按钮*/
function handleSubmit() {
/**确定按钮*/
function handleSubmit() {
router.push({
path: '/metaModel/physicsModel/EditRowTable',
query: {
},
query: {},
});
closeModal()
}
closeModal();
}
</script>
......@@ -169,6 +169,7 @@ export const TreeData: any[] = [
delFlag: '0',
flag: '1',
businessId: 100,
value: 100,
modelName: '物理模型',
parentId: 0,
'code:': '001',
......@@ -182,44 +183,52 @@ export const TreeData: any[] = [
},
{
businessId: 101,
value: 101,
modelName: '个人工作区',
parentId: 100,
},
{
businessId: 201,
value: 201,
modelName: '数仓1',
parentId: 101,
},
{
businessId: 301,
value: 301,
modelName: 'argodb_test',
parentId: 201,
},
{
businessId: 401,
value: 401,
modelName: 'dw_prd_contract_f',
parentId: 301,
},
{
businessId: 102,
value: 102,
modelName: '共享工作区',
parentId: 100,
},
{
businessId: 202,
value: 202,
modelName: '数仓2',
parentId: 102,
},
{
businessId: 302,
value: 302,
modelName: 'argodb_test',
parentId: 202,
},
{
businessId: 402,
value: 402,
modelName: 'dw_prd_contract_f',
parentId: 302,
},
......
<template>
<div class="m-4 mr-0 overflow-hidden bg-white">
<BasicTree
ref="treeRef"
treeWrapperClassName="h-[calc(100%-35px)] overflow-auto"
:clickRowToExpand="true"
:defaultExpandAll="true"
:checkable="prop.checkable"
:treeData="treeData"
:fieldNames="{ key: 'businessId', title: 'modelName' }"
@select="handleSelect"
/>
</div>
</template>
<script lang="ts" setup>
import { nextTick, onMounted, ref, unref } from 'vue';
import { BasicTree, TreeActionType, TreeItem } from '@/components/Tree';
import { Nullable } from '@vben/types';
import { TreeData } from '@/views/dataWarehousePlanning/physicalModel/modelData';
defineOptions({ name: 'DeptTree' });
const emit = defineEmits(['select']);
const prop = defineProps({
checkable: {
type: Boolean,
default: false,
},
});
const treeData = ref<TreeItem[]>([]);
const treeRef = ref<Nullable<TreeActionType>>(null);
function getTree() {
const tree = unref(treeRef);
if (!tree) {
throw new Error('tree is null!');
}
return tree;
}
async function fetch() {
const data = TreeData;
treeData.value = handleTree(data, 'businessId', undefined, undefined, undefined);
await nextTick(() => {
getTree().expandAll(true);
});
}
function handleTree(data, id, parentId, children, rootId) {
id = id || 'id';
parentId = parentId || 'parentId';
children = children || 'children';
rootId =
rootId ||
Math.min.apply(
Math,
data.map((item) => {
return item[parentId];
}),
) ||
0;
// 对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data));
// 循环所有项
const treeData = cloneData.filter((father) => {
const branchArr = cloneData.filter((child) => {
// 返回每一项的子级数组
return father[id] === child[parentId];
});
branchArr.length > 0 ? (father.children = branchArr) : '';
// 返回第一层
return father[parentId] === rootId;
});
return treeData !== '' ? treeData : data;
}
function handleSelect(keys) {
emit('select', keys[0]);
}
onMounted(() => {
fetch();
});
</script>
<template>
<BasicModal
width="40%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import {dataSourceFormSchema, modelFormSchema} from './model.data';
import { useMessage } from '@/hooks/web/useMessage';
import { TreeData } from '@/views/dataWarehousePlanning/physicalModel/modelData';
import {ref, unref} from "vue";
import {physicalModelAdd} from "@/views/dataWarehousePlanning/physicalModel/model.data";
const { createMessage } = useMessage();
const getTitle = '关联元数据';
const isUpdate = ref(true);
const rowId = ref('');
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: dataSourceFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
// 获取行数据的id
rowId.value = data.record.businessId;
// 塞值
await setFieldsValue({
...data.record,
});
}
const treeList = handleTree(TreeData, 'businessId', undefined, undefined, undefined);
console.log('treeList', treeList);
await updateSchema([
{
field: 'modelId',
componentProps: {
treeData: treeList,
},
},
]);
});
function handleTree(data, id, parentId, children, rootId) {
id = id || 'id';
parentId = parentId || 'parentId';
children = children || 'children';
rootId =
rootId ||
Math.min.apply(
Math,
data.map((item) => {
return item[parentId];
}),
) ||
0;
// 对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data));
// 循环所有项
const treeData = cloneData.filter((father) => {
const branchArr = cloneData.filter((child) => {
// 返回每一项的子级数组
return father[id] === child[parentId];
});
branchArr.length > 0 ? (father.children = branchArr) : '';
// 返回第一层
return father[parentId] === rootId;
});
return treeData !== '' ? treeData : data;
}
function handleSubmit() {
closeModal();
createMessage.success('关联成功');
}
</script>
<style scoped></style>
......@@ -4,7 +4,7 @@
<a-button type="primary">导出</a-button>
<a-button type="primary">刷新</a-button>
<a-button type="primary">全屏</a-button>
<a-button type="primary">退出</a-button>
<a-button type="primary" @click="handleQuit">退出</a-button>
</template>
<img src="../../../../../assets/images/assetER.png" style="width: 100%" />
</PageWrapper>
......@@ -36,6 +36,9 @@
function handleGoBack() {
router.go(-1);
}
function handleQuit() {
router.go(-1);
}
function handleAdd() {
openModal(true);
}
......
<template>
<BasicModal
width="40%"
height="200px"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { createSqlFormSchema } from './model.data';
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
const getTitle = '关联元数据';
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: createSqlFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {});
function handleSubmit() {
closeModal();
createMessage.success('新建成功');
}
</script>
<style scoped></style>
......@@ -401,14 +401,16 @@
/** 发布*/
function handlePublish() {
console.log('editStatus', editStatus);
if (editStatus === '编辑中') {
openFailModal(true);
} else {
createConfirm({
iconType: 'info',
title: '发布',
content: '确认进入到申请发布页面?',
onOk() {
push({
path: '/dataWarehousePlanning/physicalModel/upload',
});
}
},
});
}
function handleGoBack() {
......
import { BasicColumn, FormSchema } from '@/components/Table';
import { DescItem } from '@/components/Description';
import { TreeData } from '@/views/metadata/metadataData';
// 引入开关组件
export const entityColumns: BasicColumn[] = [
{
......@@ -74,6 +75,144 @@ export const PhysicalColumns: BasicColumn[] = [
width: 150,
},
];
export const dataSourceFormSchema: FormSchema[] = [
{
field: 'modelId',
label: '关联元数据',
component: 'TreeSelect',
colProps: { lg: 24, md: 24 },
componentProps: {
fieldNames: {
label: 'workSpaceName',
value: 'businessId',
},
treeData: handleTree(TreeData, 'businessId', undefined, undefined, undefined),
},
},
];
function handleTree(data, id, parentId, children, rootId) {
id = id || 'id';
parentId = parentId || 'parentId';
children = children || 'children';
rootId =
rootId ||
Math.min.apply(
Math,
data.map((item) => {
return item[parentId];
}),
) ||
0;
// 对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data));
// 循环所有项
const treeData = cloneData.filter((father) => {
const branchArr = cloneData.filter((child) => {
// 返回每一项的子级数组
return father[id] === child[parentId];
});
branchArr.length > 0 ? (father.children = branchArr) : '';
// 返回第一层
return father[parentId] === rootId;
});
return treeData !== '' ? treeData : data;
}
export const createSqlFormSchema: FormSchema[] = [
{
field: 'sqlName',
label: '名称',
component: 'Input',
colProps: { lg: 24, md: 24 },
},
{
field: 'sqlPath',
label: '路径',
component: 'TreeSelect',
componentProps: {
treeData: [
{
title: 'DMP_admin-个人工作区',
value: '0-0-0',
icon: 'ion:desktop-outline',
children: [
{ title: 'employee', value: '0-0-0-1', icon: 'ant-design:line-chart-outlined' },
{ title: 'employee1', value: '0-0-0-2', icon: 'ant-design:line-chart-outlined' },
],
},
{
title: '共享工作区',
value: '0-0-1',
icon: 'ion:desktop-outline',
children: [
{ title: 'employee2', value: '0-0-0-3', icon: 'ant-design:line-chart-outlined' },
{ title: 'employee3', value: '0-0-0-4', icon: 'ant-design:line-chart-outlined' },
],
},
{
title: '商城工作区',
value: '0-0-3',
icon: 'ion:desktop-outline',
children: [
{ title: 'employee4', value: '0-0-0-7', icon: 'ant-design:line-chart-outlined' },
{ title: 'employee5', value: '0-0-0-8', icon: 'ant-design:line-chart-outlined' },
],
},
],
},
colProps: { lg: 24 },
},
{
field: 'relateDes',
label: '关联描述',
component: 'Input',
colProps: { lg: 24, md: 24 },
},
];
export const relateSqlFormSchema: FormSchema[] = [
{
field: 'relateSql',
label: '关联Sql文件',
component: 'TreeSelect',
componentProps: {
treeData: [
{
title: 'DMP_admin-个人工作区',
value: '0-0-0',
icon: 'ion:desktop-outline',
children: [
{ title: 'employee', value: '0-0-0-1', icon: 'ant-design:line-chart-outlined' },
{ title: 'employee1', value: '0-0-0-2', icon: 'ant-design:line-chart-outlined' },
],
},
{
title: '共享工作区',
value: '0-0-1',
icon: 'ion:desktop-outline',
children: [
{ title: 'employee2', value: '0-0-0-3', icon: 'ant-design:line-chart-outlined' },
{ title: 'employee3', value: '0-0-0-4', icon: 'ant-design:line-chart-outlined' },
],
},
{
title: '商城工作区',
value: '0-0-3',
icon: 'ion:desktop-outline',
children: [
{ title: 'employee4', value: '0-0-0-7', icon: 'ant-design:line-chart-outlined' },
{ title: 'employee5', value: '0-0-0-8', icon: 'ant-design:line-chart-outlined' },
],
},
],
},
colProps: { lg: 24 },
},
{
field: 'relateDes',
label: '关联描述',
component: 'InputTextArea',
colProps: { lg: 24, md: 24 },
},
];
export const SqlDevelopColumns: BasicColumn[] = [
{
......@@ -375,13 +514,10 @@ export const piblishCreateFormSchema: any[] = [
{
field: 'editDataBase',
label: '待修改元数据',
component: 'InputSearch',
component: 'Select',
componentProps: {
itemIcon: 'settings-outline',
options: [
{ label: '版本V1.0', value: '版本V1.0' },
{ label: '版本V1.1', value: '版本V1.1' },
],
options: [{ label: 'dw_prd_oontract_quot_h_s', value: 'dw_prd_oontract_quot_h_s' }],
},
colProps: { lg: 24, md: 24 },
required: true,
......@@ -556,7 +692,6 @@ export const phycomparisonInfoSchema: DescItem[] = [
},
];
export const failColumns: BasicColumn[] = [
{
title: '模型名称',
......
......@@ -76,14 +76,6 @@ export const entityData: any[] = [
syncTime: '2024-11-01 13:44:16',
operateName: 'user',
},
{
name: 'pltable_yca12',
dataBase: 'INCEPTOR',
modelId: '/sdfasdf/y_test/pltable_yca12',
relateTime: '2023/12/30 12:21:09',
syncTime: '2024-02-11 10:14:16',
operateName: 'user',
},
];
export const PhysicalData: any[] = [
......
<template>
<PageWrapper title="模型关系" contentBackground headerSticky @back="handleGoBack">
<PageWrapper title="模型关系" @back="handleGoBack">
<template #extra>
<a-button type="primary">刷新</a-button>
<a-button type="primary">全屏</a-button>
<a-button type="primary">退出</a-button>
<a-button type="primary" @click="handleQuit">退出</a-button>
</template>
<template #footer>
<div style="display: flex">
......@@ -26,21 +26,56 @@
/></a-button>
</div>
<div style="flex: 4">
<img
v-if="modelLevel === '1' || modelLevel === '2'"
src="../../../../../assets/images/ERchart.jpg"
class="erchart-img"
<div :class="divHeight > 57 ? 'imgclass1' : 'imgclass2'">
<img src="../../../../../assets/images/ERchart.jpg" class="erchart-img" />
</div>
<div v-show="modelLevel === '3' || modelLevel === '4'" ref="info">
<CollapseContainer title="基础收缩示例">
<Tabs v-model:activeKey="tabsKey">
<Tabs.TabPane key="1" tab="基本信息">
<div class="comparsion-title">表信息</div>
<Description
size="middle"
:bordered="false"
:column="2"
:data="infoData"
:schema="checkFormSchema"
/>
<Divider style="width: 48%" />
<div class="comparsion-title">管理元数据</div>
<Description
size="middle"
:bordered="false"
:column="2"
:data="partitioncheckinfoData"
:schema="partitioncheckFormSchema"
/>
<img
v-if="modelLevel === '3' || modelLevel === '4'"
src="../../../../../assets/images/modelrelate.png"
class="erchart-img"
</Tabs.TabPane>
<Tabs.TabPane key="2" tab="详细信息">
<div class="comparsion-title">分区信息</div>
<Description
size="middle"
:bordered="false"
:column="1"
:data="areaInfoData"
:schema="areaFormSchema"
/>
<img
v-if="modelLevel === '5' || modelLevel === '6'"
src="../../../../../assets/images/modelrelate1.png"
class="erchart-img"
<Divider style="width: 50%" />
<div class="comparsion-title">分桶信息</div>
<Description
size="middle"
:bordered="false"
:column="1"
:data="bucketInfoData"
:schema="bucketFormSchema"
/>
<Divider style="width: 50%" />
<div class="comparsion-title">列信息</div>
<BasicTable @register="registerTable" :searchInfo="searchInfo" />
</Tabs.TabPane>
</Tabs>
</CollapseContainer>
</div>
</div>
</div>
</template>
......@@ -56,24 +91,75 @@
import { chartTreeData } from './relate.data';
import CrossModel from '@/views/dataWarehousePlanning/physicalModel/modelDetail/modelRelationship/crossModel.vue';
import { useModal } from '@/components/Modal';
import { ref } from 'vue';
import { computed, onBeforeUnmount, onMounted, ref } from 'vue';
import { useRouter } from 'vue-router';
import { Divider, Tabs } from 'ant-design-vue';
import { CollapseContainer } from '@/components/Container';
import { BasicForm } from '@/components/Form';
import {
areaFormSchema,
areaInfoData,
bucketFormSchema,
bucketInfoData,
checkFormSchema,
infoData,
partitioncheckFormSchema,
partitioncheckinfoData,
} from '@/views/dataWarehousePlanning/physicalModel/upload/uploadData';
import { Description } from '@/components/Description';
import { BasicTable, useTable } from '@/components/Table';
import { checkinfoData } from '@/views/dataWarehousePlanning/physicalModel/modelDetail/modelData';
import { checkcolumnsDetail } from '@/views/dataWarehousePlanning/physicalModel/model.data';
// 模态框
const [crossModal, { openModal }] = useModal();
const tabsKey = ref('1');
let modelLevel = ref('1');
// 获取目标 div
const height = ref(0);
const [
registerTable,
{ reload, updateTableDataRecord, getSearchInfo, getForm, getRowSelection },
] = useTable({
scroll: { y: 200 },
api: async (params) => {
console.log('params:', params);
const response = {
pageNu: '1',
pageSize: '10',
pages: '1',
total: checkinfoData.length,
code: '',
message: '',
data: checkinfoData,
};
return { ...response };
},
columns: checkcolumnsDetail,
showIndexColumn: false,
rowSelection: false,
pagination: true,
useSearchForm: false,
showTableSetting: false,
bordered: true,
});
function handleSelect(key) {
if (key[0] !== null && key[0] !== undefined) {
modelLevel.value = key[0];
} else {
modelLevel.value = '0';
}
console.log('dasd', modelLevel.value);
}
function handleAdd() {
openModal(true);
}
function handleQuit() {
router.go(-1);
}
const router = useRouter();
function handleGoBack() {
router.go(-1);
......@@ -88,10 +174,57 @@
// value: '当前模型实体',
// },
// ];
const divHeight = ref(0); // Store the height of the div
const info = ref(null); // Reference to the info div
// Function to update divHeight based on the element's height
const updateHeight = () => {
if (info.value) {
divHeight.value = info.value.offsetHeight;
}
};
onMounted(() => {
// Set the initial height on mount
if (info.value) {
updateHeight();
// Set up ResizeObserver to monitor the size changes of the div
const resizeObserver = new ResizeObserver(updateHeight);
resizeObserver.observe(info.value);
// Cleanup observer when the component is unmounted
onBeforeUnmount(() => {
resizeObserver.disconnect();
});
}
});
</script>
<style scoped>
.erchart-img {
height: calc(100vh - 200px);
width: 100%;
object-fit: cover;
}
.comparsion-title {
font-size: 14px;
font-weight: 550;
margin-bottom: 15px;
}
.info {
width: 100%;
padding: 10px;
background-color: lightblue;
resize: both;
overflow: auto;
}
.imgclass1 {
height: 300px;
overflow-y: hidden;
}
.imgclass2 {
height: 700px;
overflow-y: hidden;
}
</style>
<template>
<BasicModal
width="40%"
height="200px"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
@ok="handleSubmit"
>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup>
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
import { relateSqlFormSchema} from './model.data';
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
const getTitle = '关联元数据';
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: relateSqlFormSchema,
showActionButtonGroup: false,
actionColOptions: {
span: 23,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {});
function handleSubmit() {
closeModal();
createMessage.success('关联成功');
}
</script>
<style scoped></style>
......@@ -19,6 +19,8 @@
</template>
</template>
</BasicTable>
<SourceDataModal @register="dataModal" />
</div>
</template>
<script lang="ts" setup>
......@@ -32,15 +34,19 @@
import { entityData } from '@/views/dataWarehousePlanning/physicalModel/modelDetail/modelData';
import EntityModel from './entityModel.vue';
import { useModal } from '@/components/Modal';
import { useMessage } from '@/hooks/web/useMessage';
import SourceDataModal
from "@/views/dataWarehousePlanning/physicalModel/modelDetail/SourceDataModal.vue";
const { push } = useRouter();
const { createMessage, createConfirm } = useMessage();
defineOptions({ name: 'AccountManagement' });
const props = defineProps({
editFlag: Boolean,
});
// 模态框
const [entityModal, { openModal }] = useModal();
const [dataModal, { openModal }] = useModal();
// 实体新增
function handleEntityModel() {
openModal(true, {
......@@ -48,7 +54,20 @@
});
}
// 实体编辑
function handleEntityEditModel(record: Recordable) {}
function handleEntityEditModel(record: Recordable) {
createConfirm({
iconType: 'warning',
title: '解除绑定',
okText: '确定',
content: '确定解除与元数据的关联关系吗?',
onOk() {
createMessage.success('解除绑定成功!');
},
});
}
function handleCrossModel() {
openModal();
}
function entitySuccess({ isUpdate, values }) {
if (isUpdate) {
// 注意:updateTableDataRecord要求表格的rowKey属性为string并且存在于每一行的record的keys中
......@@ -70,7 +89,7 @@
] = useTable({
title: '关联元数据',
// 定高
scroll: {y: 150},
scroll: { y: 150 },
// 数据
api: async (params) => {
console.log('params:', params);
......@@ -83,7 +102,7 @@
message: '',
data: entityData,
};
return {...response};
return { ...response };
},
rowKey: 'businessId',
// 列
......
......@@ -2,8 +2,15 @@
<div>
<BasicTable @register="registerTable" :searchInfo="searchInfo">
<template #toolbar>
<a-button style="color: #0960bd" type="link"><PlusOutlined />新建Sql文件</a-button>
<a-button type="link" @click="handleRelieve" :disabled="getRowSelection().selectedRowKeys <= 0">批量解绑</a-button>
<a-button style="color: #0960bd" type="link" @click="handleCreateSql"
><PlusOutlined />新建Sql文件</a-button
>
<a-button
type="link"
@click="handleRelieve"
:disabled="getRowSelection().selectedRowKeys <= 0"
>批量解绑</a-button
>
<a-button style="color: #0960bd" type="link" @click="handleCrossModel"
><Icon icon="ant-design:link-outlined" />关联Sql文件</a-button
>
......@@ -21,6 +28,8 @@
</template>
</template>
</BasicTable>
<CreateSqlModal @register="createSqlModal" />
<RelateSqlModal @register="relateSqlModal" />
</div>
</template>
<script lang="ts" setup>
......@@ -38,6 +47,8 @@
} from '@/views/dataWarehousePlanning/physicalModel/modelDetail/modelData';
import { useModal } from '@/components/Modal';
import { DeleteTwoTone, PlusOutlined } from '@ant-design/icons-vue';
import CreateSqlModal from '@/views/dataWarehousePlanning/physicalModel/modelDetail/createSqlModal.vue';
import RelateSqlModal from '@/views/dataWarehousePlanning/physicalModel/modelDetail/relateSqlModal.vue';
const { push } = useRouter();
const { createMessage, createConfirm } = useMessage();
......@@ -47,15 +58,28 @@
editFlag: Boolean,
});
// 模态框
const [entityModal, { openModal }] = useModal();
// 实体新增
function handleEntityModel() {
openModal(true, {
isUpdate: false,
const [createSqlModal, { openModal: openCreateModal }] = useModal();
const [relateSqlModal, { openModal: openRelateModal }] = useModal();
// 实体编辑
function handleEntityEditModel(record: Recordable) {
createConfirm({
iconType: 'warning',
title: '解除绑定',
okText: '确定',
content: '确定解除与Sql开发的关联关系吗?',
onOk() {
createMessage.success('解除绑定成功!');
},
});
}
// 实体编辑
function handleEntityEditModel(record: Recordable) {}
function handleCreateSql() {
openCreateModal();
}
function handleCrossModel() {
openRelateModal();
}
function entitySuccess({ isUpdate, values }) {
if (isUpdate) {
// 注意:updateTableDataRecord要求表格的rowKey属性为string并且存在于每一行的record的keys中
......@@ -77,7 +101,7 @@
] = useTable({
title: 'Sql开发',
// 定高
scroll: {y: 150},
scroll: { y: 150 },
// 数据
api: async (params) => {
console.log('params:', params);
......@@ -90,7 +114,7 @@
message: '',
data: sqlDevelopData,
};
return {...response};
return { ...response };
},
rowKey: 'businessId',
// 列
......
......@@ -46,7 +46,6 @@
/>
<Divider style="width: 50%" />
<div class="comparsion-title">列信息</div>
<BasicTable @register="registerTable" :searchInfo="searchInfo" />
</div>
</template>
......
......@@ -72,7 +72,9 @@
import BasicTable from '@/components/Table/src/BasicTable.vue';
import { useTable } from '@/components/Table';
import { useRouter } from 'vue-router';
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
const router = useRouter();
const { push } = useRouter();
const basicVersion = ref('V1.0 2023-06-15 15:34:40');
......@@ -91,6 +93,7 @@
}
function handleSubmit() {
router.go(-1);
createMessage.success('提交成功');
}
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
......
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