Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
28d372fc
Commit
28d372fc
authored
Nov 13, 2024
by
曹泽华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数仓规划 物理模型
parent
8e044c3d
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
265 additions
and
280 deletions
+265
-280
ModelTree.vue
src/views/dataWarehousePlanning/physicalModel/ModelTree.vue
+7
-1
importModal.vue
...views/dataWarehousePlanning/physicalModel/importModal.vue
+13
-15
index.vue
src/views/dataWarehousePlanning/physicalModel/index.vue
+39
-11
model.data.ts
src/views/dataWarehousePlanning/physicalModel/model.data.ts
+56
-3
modelBaseImport.vue
...s/dataWarehousePlanning/physicalModel/modelBaseImport.vue
+82
-0
modelData.ts
src/views/dataWarehousePlanning/physicalModel/modelData.ts
+0
-2
logicalModel.vue
...ehousePlanning/physicalModel/modelDetail/logicalModel.vue
+8
-10
model.data.ts
...WarehousePlanning/physicalModel/modelDetail/model.data.ts
+1
-114
modelData.ts
...aWarehousePlanning/physicalModel/modelDetail/modelData.ts
+30
-55
modelDebug.vue
...arehousePlanning/physicalModel/modelDetail/modelDebug.vue
+21
-60
sourceData.vue
...arehousePlanning/physicalModel/modelDetail/sourceData.vue
+2
-2
sqlDevelop.vue
...arehousePlanning/physicalModel/modelDetail/sqlDevelop.vue
+6
-7
No files found.
src/views/dataWarehousePlanning/physicalModel/ModelTree.vue
View file @
28d372fc
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
treeWrapperClassName=
"h-[calc(100%-35px)] overflow-auto"
treeWrapperClassName=
"h-[calc(100%-35px)] overflow-auto"
:clickRowToExpand=
"true"
:clickRowToExpand=
"true"
:defaultExpandAll=
"true"
:defaultExpandAll=
"true"
:checkable=
"prop.checkable"
:treeData=
"treeData"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: 'modelName' }"
:fieldNames=
"
{ key: 'businessId', title: 'modelName' }"
@select="handleSelect"
@select="handleSelect"
...
@@ -20,7 +21,12 @@
...
@@ -20,7 +21,12 @@
defineOptions
({
name
:
'DeptTree'
});
defineOptions
({
name
:
'DeptTree'
});
const
emit
=
defineEmits
([
'select'
]);
const
emit
=
defineEmits
([
'select'
]);
const
prop
=
defineProps
({
checkable
:
{
type
:
Boolean
,
default
:
false
,
},
});
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
function
getTree
()
{
function
getTree
()
{
...
...
src/views/dataWarehousePlanning/physicalModel/importModal.vue
View file @
28d372fc
...
@@ -7,21 +7,19 @@
...
@@ -7,21 +7,19 @@
:title=
"getTitle"
:title=
"getTitle"
@
ok=
"handleSubmit"
@
ok=
"handleSubmit"
>
>
<BasicForm
@
register=
"registerForm"
/>
<BasicForm
@
register=
"registerForm"
>
<div
class=
"modalBody"
>
<template
#
fileMethods=
"
{ model, field }">
<div
class=
"title"
>
导入文件选择
</div>
<div
style=
"display: flex"
>
<a-button
style=
"margin-right: 10px"
>
下载模板
</a-button>
<div>
<a-button
style=
"margin-right: 10px"
type=
"primary"
>
选择文件
</a-button>
<a-button>
下载模板
</a-button>
<div
style=
"width: 200px"
>
只能导入单个Excel文件,且单次导入不超过100000条数据
</div>
<a-button
type=
"primary"
style=
"margin-left: 5px"
>
选择文件
</a-button>
</div>
</div>
<div>
<div
style=
"width: 200px; margin-top: -6px; margin-left: 5px"
<span
style=
"padding-right: 20px"
>
文件重名
</span>
>
只能导入单个Excel文件,且单次导入不超过100000条数据
</div
<RadioGroup
v-model:value=
"value"
name=
"radioGroup"
>
>
<Radio
value=
"1"
>
全部放弃
</Radio>
</div>
<Radio
value=
"2"
>
全部替换
</Radio>
</
template
>
<Radio
value=
"3"
>
自动重命名
</Radio>
</BasicForm>
</RadioGroup>
</div>
</BasicModal>
</BasicModal>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
...
src/views/dataWarehousePlanning/physicalModel/index.vue
View file @
28d372fc
...
@@ -10,18 +10,17 @@
...
@@ -10,18 +10,17 @@
<template
#
toolbar
>
<template
#
toolbar
>
<a-button
type=
"primary"
>
建表记录
</a-button>
<a-button
type=
"primary"
>
建表记录
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
>
批量建表
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
>
批量建表
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
>
设为待发布
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"handleWaitUpload"
>
设为待发布
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
>
发布
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
>
发布
</a-button>
<a-button
type=
"primary"
>
从元数据导入
</a-button>
<a-button
type=
"primary"
@
click=
"handleBaseImport"
>
从元数据导入
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
>
导出
</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=
"handleImport"
>
导入
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreateFolder"
>
新建文件夹
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreateFolder"
>
新建文件夹
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreateFile"
>
新建文件
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreateFile"
>
新建文件
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"handleDelete"
>
删除
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"handleDelete
(record)
"
>
删除
</a-button>
<RadioButtonGroup
<RadioButtonGroup
@
change=
"changeTable"
@
change=
"changeTable"
:options=
"labelName"
:options=
"labelName"
@
click=
"changeTable()"
v-model:value=
"state"
v-model:value=
"state"
/>
/>
</
template
>
</
template
>
...
@@ -55,6 +54,7 @@
...
@@ -55,6 +54,7 @@
<ModelModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<ModelModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<ImportModal
@
register=
"registerImport"
/>
<ImportModal
@
register=
"registerImport"
/>
<ModelAdd
@
register=
"registerModalAdd"
/>
<ModelAdd
@
register=
"registerModalAdd"
/>
<BaseImport
@
register=
"registerBaseImport"
/>
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
import
ModelModal
from
'./modelModal.vue'
;
import
ModelModal
from
'./modelModal.vue'
;
import
ImportModal
from
'./importModal.vue'
;
import
ImportModal
from
'./importModal.vue'
;
import
ModelAdd
from
'./modelAdd.vue'
;
import
ModelAdd
from
'./modelAdd.vue'
;
import
BaseImport
from
'./modelBaseImport.vue'
;
import
{
columnsData
,
columnsSystem
,
searchFormSchema
}
from
'./model.data'
;
import
{
columnsData
,
columnsSystem
,
searchFormSchema
}
from
'./model.data'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
useRoute
,
onBeforeRouteLeave
,
useRouter
}
from
'vue-router'
;
import
{
useRoute
,
onBeforeRouteLeave
,
useRouter
}
from
'vue-router'
;
...
@@ -76,10 +77,11 @@
...
@@ -76,10 +77,11 @@
import
RadioButtonGroup
from
'@/components/Form/src/components/RadioButtonGroup.vue'
;
import
RadioButtonGroup
from
'@/components/Form/src/components/RadioButtonGroup.vue'
;
const
{
push
}
=
useRouter
();
const
{
push
}
=
useRouter
();
let
baseImport
=
ref
(
false
);
const
state
=
ref
(
'系统视图'
);
const
state
=
ref
(
'系统视图'
);
const
labelName
=
[
'数据视图'
,
'系统视图'
];
const
labelName
=
[
'数据视图'
,
'系统视图'
];
defineOptions
({
name
:
'AccountManagement'
});
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
filterStore
=
useFilterStore
();
const
filterStore
=
useFilterStore
();
const
route
=
useRoute
();
const
route
=
useRoute
();
const
go
=
useGo
();
const
go
=
useGo
();
...
@@ -88,6 +90,7 @@
...
@@ -88,6 +90,7 @@
const
[
registerImport
,
{
openModal
:
openImportModal
}]
=
useModal
();
const
[
registerImport
,
{
openModal
:
openImportModal
}]
=
useModal
();
const
[
registerModalAdd
,
{
openModal
:
openModalAdd
}]
=
useModal
();
const
[
registerModalAdd
,
{
openModal
:
openModalAdd
}]
=
useModal
();
const
[
registerMoveUser
,
{
openModal
:
openMoveUserModal
}]
=
useModal
();
const
[
registerMoveUser
,
{
openModal
:
openMoveUserModal
}]
=
useModal
();
const
[
registerBaseImport
,
{
openModal
:
openBaseImportUserModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
searchInfo
=
reactive
<
Recordable
>
({});
const
tableData
=
ref
([]);
const
tableData
=
ref
([]);
const
[
const
[
...
@@ -162,6 +165,14 @@
...
@@ -162,6 +165,14 @@
});
});
}
}
/** 从元数据导入*/
function
handleBaseImport
()
{
baseImport
.
value
=
true
;
openBaseImportUserModal
(
true
,
{
isUpdate
:
false
,
});
}
/** 新建文件夹*/
/** 新建文件夹*/
function
handleCreateFolder
()
{
function
handleCreateFolder
()
{
openModalAdd
(
true
,
{
openModalAdd
(
true
,
{
...
@@ -210,12 +221,14 @@
...
@@ -210,12 +221,14 @@
/** 删除按钮*/
/** 删除按钮*/
function
handleDelete
(
record
:
Recordable
)
{
function
handleDelete
(
record
:
Recordable
)
{
tableData
.
value
.
splice
(
createConfirm
({
tableData
.
value
.
findIndex
((
item
)
=>
item
.
businessId
===
record
.
businessId
),
iconType
:
'warning'
,
1
,
title
:
'确认删除'
,
);
content
:
'确认批量删除选中数据吗?'
,
createMessage
.
success
(
'删除成功!'
);
onOk
()
{
reload
();
createMessage
.
success
(
'批量删除成功!'
);
},
});
}
}
/** 新增/编辑成功*/
/** 新增/编辑成功*/
...
@@ -246,6 +259,21 @@
...
@@ -246,6 +259,21 @@
reload
();
reload
();
}
}
/**
* 设为待发布
*/
function
handleWaitUpload
()
{
createConfirm
({
iconType
:
'success'
,
title
:
'设为待发布成功'
,
okText
:
'发布'
,
content
:
'设为待发布成功,是否选择发布?'
,
onOk
()
{
createMessage
.
success
(
'发布成功!'
);
},
});
}
function
handleView
(
record
:
Recordable
)
{
function
handleView
(
record
:
Recordable
)
{
go
(
'/system/account_detail/'
+
record
.
id
);
go
(
'/system/account_detail/'
+
record
.
id
);
}
}
...
...
src/views/dataWarehousePlanning/physicalModel/model.data.ts
View file @
28d372fc
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
import
{
selectProps
}
from
"ant-design-vue/es/select"
;
export
const
columnsSystem
:
BasicColumn
[]
=
[
export
const
columnsSystem
:
BasicColumn
[]
=
[
{
{
...
@@ -128,13 +129,64 @@ export const importSchema: any[] = [
...
@@ -128,13 +129,64 @@ export const importSchema: any[] = [
field
:
'fileType'
,
field
:
'fileType'
,
label
:
'导入文件类型'
,
label
:
'导入文件类型'
,
component
:
'Select'
,
component
:
'Select'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
componentProps
:
{
options
:
[
options
:
[
{
label
:
'Excel'
,
value
:
'Excel'
},
{
label
:
'Erwin(.xml)'
,
value
:
'1'
},
{
label
:
'Word'
,
value
:
'Word'
},
{
label
:
'PowerDesigner(.ldm)'
,
value
:
'2'
},
{
label
:
'Excel(.xlsx)'
,
value
:
'3'
},
],
],
},
},
},
{
field
:
'fileMethods'
,
label
:
'导入文件选择'
,
slot
:
'fileMethods'
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'fileRename'
,
label
:
'文件重名'
,
component
:
'RadioGroup'
,
required
:
true
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
options
:
[
{
label
:
'全部放弃'
,
value
:
'1'
},
{
label
:
'全部替换'
,
value
:
'2'
},
{
label
:
'自动重命名'
,
value
:
'3'
},
],
},
},
];
export
const
baseImportSchema
:
any
[]
=
[
{
field
:
'modelId'
,
label
:
'导入路径'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
fieldNames
:
{
label
:
'modelName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'fileRename'
,
label
:
'文件重名'
,
component
:
'RadioGroup'
,
required
:
true
,
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
options
:
[
{
label
:
'全部放弃'
,
value
:
'1'
},
{
label
:
'全部替换'
,
value
:
'2'
},
{
label
:
'自动重命名'
,
value
:
'3'
},
],
},
},
},
];
];
/**查询表单*/
/**查询表单*/
...
@@ -167,6 +219,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -167,6 +219,7 @@ export const searchFormSchema: FormSchema[] = [
label
:
' '
,
label
:
' '
,
component
:
'Select'
,
component
:
'Select'
,
componentProps
:
{
componentProps
:
{
mode
:
'multiple'
,
placeholder
:
'调试状态'
,
placeholder
:
'调试状态'
,
options
:
[
options
:
[
{
label
:
'未调试'
,
value
:
'未调试'
},
{
label
:
'未调试'
,
value
:
'未调试'
},
...
@@ -218,7 +271,7 @@ export const physicalModelFormSchema: any[] = [
...
@@ -218,7 +271,7 @@ export const physicalModelFormSchema: any[] = [
},
},
];
];
/**新建文件*/
/**新建文件
夹
*/
export
const
physicalModelAdd
:
any
[]
=
[
export
const
physicalModelAdd
:
any
[]
=
[
{
{
field
:
'modelId'
,
field
:
'modelId'
,
...
...
src/views/dataWarehousePlanning/physicalModel/modelBaseImport.vue
0 → 100644
View file @
28d372fc
<
template
>
<BasicModal
min-height=
"100"
width=
"30%"
v-bind=
"$attrs"
@
register=
"registerBaseImport"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<ModelTree
:checkable=
"true"
/>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
Radio
,
RadioGroup
}
from
'ant-design-vue'
;
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
// import { formSchema } from './gradingResults.data';
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
baseImportSchema
}
from
'@/views/dataWarehousePlanning/physicalModel/model.data'
;
import
ModelTree
from
'@/views/dataWarehousePlanning/physicalModel/ModelTree.vue'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
BasicTree
}
from
'@/components/Tree'
;
defineOptions
({
name
:
'ImportModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
rowId
=
ref
(
''
);
const
value
=
ref
<
string
>
(
'1'
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
24
,
md
:
24
},
schemas
:
baseImportSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerBaseImport
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
if
(
unref
(
isUpdate
))
{
// 通过id获取行详情信息
// 塞值
setFieldsValue
({
...
data
.
record
,
});
}
});
const
getTitle
=
computed
(()
=>
'从元数据导入'
);
async
function
handleSubmit
()
{
try
{
const
values
=
await
validate
();
setModalProps
({
confirmLoading
:
true
});
// TODO custom api
closeModal
();
emit
(
'success'
,
{
isUpdate
:
unref
(
isUpdate
),
values
:
{
...
values
,
id
:
rowId
.
value
}
});
}
finally
{
setModalProps
({
confirmLoading
:
false
});
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.modalBody
{
display
:
flex
;
align-items
:
center
;
.title
{
padding-right
:
15px
;
}
}
</
style
>
src/views/dataWarehousePlanning/physicalModel/modelData.ts
View file @
28d372fc
...
@@ -154,8 +154,6 @@ export const TreeData: any[] = [
...
@@ -154,8 +154,6 @@ export const TreeData: any[] = [
},
},
];
];
export
const
editTableData
:
any
[]
=
[
export
const
editTableData
:
any
[]
=
[
{
{
businessId
:
1
,
businessId
:
1
,
...
...
src/views/dataWarehousePlanning/physicalModel/modelDetail/logicalModel.vue
View file @
28d372fc
...
@@ -7,16 +7,14 @@
...
@@ -7,16 +7,14 @@
import
{
reactive
,
onMounted
,
ref
,
defineProps
}
from
'vue'
;
import
{
reactive
,
onMounted
,
ref
,
defineProps
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
useRoute
,
onBeforeRouteLeave
,
useRouter
}
from
'vue-router'
;
import
{
useRoute
,
onBeforeRouteLeave
,
useRouter
}
from
'vue-router'
;
import
{
entityColumns
,
entityFormSchema
,
locailColumns
}
from
'./model.data'
;
import
{
entityColumns
,
entityFormSchema
,
locailColumns
,
PhysicalColumns
}
from
'./model.data'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
TreeData
}
from
'@/views/dataWarehousePlanning/logicalModel/modelData'
;
import
{
TreeData
}
from
'@/views/dataWarehousePlanning/logicalModel/modelData'
;
import
{
entityData
,
logcialModel
,
}
from
'@/views/dataWarehousePlanning/logicalModel/modelDetail/modelData'
;
import
EntityModel
from
'./entityModel.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
DeleteTwoTone
,
PlusCircleTwoTone
}
from
'@ant-design/icons-vue'
;
import
{
locailData
,
PhysicalData
,
sqlDevelopData
}
from
"@/views/dataWarehousePlanning/physicalModel/modelDetail/modelData"
;
const
{
push
}
=
useRouter
();
const
{
push
}
=
useRouter
();
...
@@ -69,16 +67,16 @@
...
@@ -69,16 +67,16 @@
pageNu
:
'1'
,
pageNu
:
'1'
,
pageSize
:
'10'
,
pageSize
:
'10'
,
pages
:
'1'
,
pages
:
'1'
,
total
:
logcialModel
.
length
,
total
:
PhysicalData
.
length
,
code
:
''
,
code
:
''
,
message
:
''
,
message
:
''
,
data
:
logcialModel
,
data
:
PhysicalData
,
};
};
return
{
...
response
};
return
{
...
response
};
},
},
rowKey
:
'businessId'
,
rowKey
:
'businessId'
,
// 列
// 列
columns
:
locai
lColumns
,
columns
:
Physica
lColumns
,
showIndexColumn
:
false
,
showIndexColumn
:
false
,
rowSelection
:
false
,
rowSelection
:
false
,
pagination
:
false
,
pagination
:
false
,
...
...
src/views/dataWarehousePlanning/physicalModel/modelDetail/model.data.ts
View file @
28d372fc
...
@@ -43,7 +43,7 @@ export const entityColumns: BasicColumn[] = [
...
@@ -43,7 +43,7 @@ export const entityColumns: BasicColumn[] = [
},
},
];
];
export
const
locai
lColumns
:
BasicColumn
[]
=
[
export
const
Physica
lColumns
:
BasicColumn
[]
=
[
{
{
title
:
'名称'
,
title
:
'名称'
,
dataIndex
:
'name'
,
dataIndex
:
'name'
,
...
@@ -120,119 +120,6 @@ export const entityFormSchema: FormSchema[] = [
...
@@ -120,119 +120,6 @@ export const entityFormSchema: FormSchema[] = [
colProps
:
{
span
:
4
},
colProps
:
{
span
:
4
},
},
},
];
];
export
const
connectionTable
:
BasicColumn
[]
=
[
{
title
:
'名称'
,
dataIndex
:
'name'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'父实体名称'
,
dataIndex
:
'fatherName'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'父实体属性PK'
,
dataIndex
:
'fatherPK'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'父端基数'
,
dataIndex
:
'fatherNum'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'子实体名称'
,
dataIndex
:
'sonName'
,
width
:
150
,
},
{
title
:
'子实体属性PK'
,
dataIndex
:
'sonPK'
,
width
:
150
,
},
{
title
:
'子端基数'
,
dataIndex
:
'sonNum'
,
width
:
150
,
},
];
export
const
connectionFormSchema
:
FormSchema
[]
=
[
{
field
:
'name'
,
component
:
'Input'
,
componentProps
:
{
placeholder
:
'输入关联关系名称搜索'
,
},
colProps
:
{
span
:
4
},
},
];
export
const
crossTable
:
BasicColumn
[]
=
[
{
title
:
'名称'
,
dataIndex
:
'name'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'父逻辑模型名称'
,
dataIndex
:
'fatherModelName'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'父实体名称'
,
dataIndex
:
'fatherName'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'父实体属性PK'
,
dataIndex
:
'fatherPK'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'父端基数'
,
dataIndex
:
'fatherNum'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'子逻辑模型名称'
,
dataIndex
:
'sonModelName'
,
width
:
150
,
},
{
title
:
'子实体名称'
,
dataIndex
:
'sonName'
,
width
:
150
,
},
{
title
:
'子实体属性PK'
,
dataIndex
:
'sonPK'
,
width
:
150
,
},
{
title
:
'子端基数'
,
dataIndex
:
'sonNum'
,
width
:
150
,
},
];
export
const
crossFormSchema
:
FormSchema
[]
=
[
{
field
:
'name'
,
component
:
'Input'
,
componentProps
:
{
placeholder
:
'输入关联关系名称搜索'
,
},
colProps
:
{
span
:
4
},
},
];
export
const
modelFormSchema
:
any
[]
=
[
export
const
modelFormSchema
:
any
[]
=
[
{
{
field
:
'modelId'
,
field
:
'modelId'
,
...
...
src/views/dataWarehousePlanning/physicalModel/modelDetail/modelData.ts
View file @
28d372fc
import
{
FormSchema
}
from
'@/components/Form'
;
import
{
FormSchema
}
from
'@/components/Form'
;
import
{
BasicColumn
}
from
"@/components/Table"
;
import
{
BasicColumn
}
from
'@/components/Table'
;
import
{
PhysicalColumns
}
from
"@/views/dataWarehousePlanning/physicalModel/modelDetail/model.data"
;
export
const
infoData
=
{
export
const
infoData
=
{
dataBase
:
'测试类型'
,
dataBase
:
'测试类型'
,
...
@@ -37,66 +38,40 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -37,66 +38,40 @@ export const searchFormSchema: FormSchema[] = [
];
];
export
const
entityData
:
any
[]
=
[
export
const
entityData
:
any
[]
=
[
{
{
businessId
:
'
1'
,
name
:
'yLtable_orc0
1'
,
name
:
'dw_产品合约行情历史
'
,
dataBase
:
'INCEPTOR
'
,
txt
:
'dw_产品合约行情历史
'
,
modelId
:
'/sdfasdf/y_test/yl_table_orc01
'
,
engName
:
'dw_prd_contract_quot_h_s
'
,
relateTime
:
'2023/10/20 17:38:29
'
,
person
:
'admin
'
,
syncTime
:
'2024-11-01 13:44:16
'
,
deptName
:
'机构管理/数据平台治理部
'
,
operateName
:
'user
'
,
},
},
{
{
businessId
:
'
2'
,
name
:
'pltable_yca1
2'
,
name
:
'dw_合约
'
,
dataBase
:
'INCEPTOR
'
,
txt
:
'dw_合约
'
,
modelId
:
'/sdfasdf/y_test/pltable_yca12
'
,
engName
:
'dw_prd_contract_f
'
,
relateTime
:
'2023/12/30 12:21:09
'
,
person
:
'admin
'
,
syncTime
:
'2024-02-11 10:14:16
'
,
deptName
:
'机构管理/数据平台治理部
'
,
operateName
:
'user
'
,
},
},
];
];
export
const
connectionData
:
any
[]
=
[
{
export
const
PhysicalData
:
any
[]
=
[
name
:
'合约_行情'
,
fatherName
:
'dw_合约'
,
fatherPK
:
'合约号'
,
fatherNum
:
'1'
,
sonName
:
'dw_产品合约行情历史'
,
sonPK
:
'合约号'
,
sonNum
:
'1'
,
},
{
name
:
'合约_行情'
,
fatherName
:
'dw_合约'
,
fatherPK
:
'合约号'
,
fatherNum
:
'1'
,
sonName
:
'dw_产品合约行情历史'
,
sonPK
:
'合约号'
,
sonNum
:
'1'
,
},
{
name
:
'合约_行情'
,
fatherName
:
'dw_合约'
,
fatherPK
:
'合约号'
,
fatherNum
:
'1'
,
sonName
:
'dw_产品合约行情历史'
,
sonPK
:
'合约号'
,
sonNum
:
'1'
,
},
{
{
name
:
'合约_行情'
,
name
:
'逻辑模型1'
,
fatherName
:
'dw_合约'
,
entityName
:
'dwEntity'
,
fatherPK
:
'合约号'
,
modelId
:
'物理模型/共享工作区/1/test编镜'
,
fatherNum
:
'1'
,
relateDescribe
:
'admin'
,
sonName
:
'dw_产品合约行情历史'
,
relateTime
:
'2024-10-20 12:14:46'
,
sonPK
:
'合约号'
,
operateName
:
'admin'
,
sonNum
:
'1'
,
},
},
];
export
const
sqlDevelopData
:
any
[]
=
[
{
{
name
:
'合约_行情'
,
name
:
'employee'
,
fatherName
:
'dw_合约'
,
modelId
:
'/共享工作区/employee'
,
fatherPK
:
'合约号'
,
relateDescribe
:
'-'
,
fatherNum
:
'1'
,
relateTime
:
'2023-10-20 17:38:38'
,
sonName
:
'dw_产品合约行情历史'
,
operateName
:
'admin'
,
sonPK
:
'合约号'
,
sonNum
:
'1'
,
},
},
];
];
src/views/dataWarehousePlanning/physicalModel/modelDetail/modelDebug.vue
View file @
28d372fc
<
template
>
<
template
>
<BasicModal
<BasicModal
min-height=
"
1
00"
min-height=
"
2
00"
width=
"3
0
%"
width=
"3
2
%"
v-bind=
"$attrs"
v-bind=
"$attrs"
@
register=
"registerModal"
@
register=
"registerModal"
:title=
"getTitle"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
>
<div
style=
"width: 100%; height: 100%"
>
<img
src=
"../../../../assets/images/debug.png"
/>
</div>
</BasicModal>
</BasicModal>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
Radio
,
RadioGroup
}
from
'ant-design-vue'
;
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
// import { formSchema } from './gradingResults.data';
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
importSchema
}
from
'@/views/dataWarehousePlanning/physicalModel/model.data'
;
defineOptions
({
name
:
'DebugModal'
});
defineOptions
({
name
:
'DebugModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
isUpdate
=
ref
(
true
);
const
{
createMessage
}
=
useMessage
();
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
const
isUpdate
=
ref
(
true
);
//初始化表单
const
rowId
=
ref
(
''
);
//初始化弹框
const
value
=
ref
<
string
>
(
'1'
);
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
setModalProps
({
//初始化表单
confirmLoading
:
false
,
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
height
:
420
,
labelWidth
:
100
,
baseColProps
:
{
lg
:
24
,
md
:
24
},
schemas
:
importSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
if
(
unref
(
isUpdate
))
{
// 通过id获取行详情信息
// 塞值
setFieldsValue
({
...
data
.
record
,
});
});
}
isUpdate
.
value
=
!!
data
?.
isUpdate
;
});
});
const
getTitle
=
computed
(()
=>
'建表调试日志'
);
const
getTitle
=
computed
(()
=>
'建表调试日志'
);
async
function
handleSubmit
()
{
try
{
const
values
=
await
validate
();
setModalProps
({
confirmLoading
:
true
});
// TODO custom api
closeModal
();
emit
(
'success'
,
{
isUpdate
:
unref
(
isUpdate
),
values
:
{
...
values
,
id
:
rowId
.
value
}
});
}
finally
{
setModalProps
({
confirmLoading
:
false
});
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.modalBody
{
.erchart-img
{
display
:
flex
;
height
:
100px
;
align-items
:
center
;
.title
{
padding-right
:
15px
;
}
}
}
</
style
>
</
style
>
src/views/dataWarehousePlanning/physicalModel/modelDetail/sourceData.vue
View file @
28d372fc
...
@@ -37,8 +37,8 @@
...
@@ -37,8 +37,8 @@
import
{
entityColumns
,
entityFormSchema
}
from
'./model.data'
;
import
{
entityColumns
,
entityFormSchema
}
from
'./model.data'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
TreeData
}
from
'@/views/dataWarehousePlanning/
log
icalModel/modelData'
;
import
{
TreeData
}
from
'@/views/dataWarehousePlanning/
phys
icalModel/modelData'
;
import
{
entityData
}
from
'@/views/dataWarehousePlanning/
log
icalModel/modelDetail/modelData'
;
import
{
entityData
}
from
'@/views/dataWarehousePlanning/
phys
icalModel/modelDetail/modelData'
;
import
EntityModel
from
'./entityModel.vue'
;
import
EntityModel
from
'./entityModel.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
...
...
src/views/dataWarehousePlanning/physicalModel/modelDetail/sqlDevelop.vue
View file @
28d372fc
...
@@ -39,12 +39,11 @@
...
@@ -39,12 +39,11 @@
import
{
useRoute
,
onBeforeRouteLeave
,
useRouter
}
from
'vue-router'
;
import
{
useRoute
,
onBeforeRouteLeave
,
useRouter
}
from
'vue-router'
;
import
{
entityColumns
,
entityFormSchema
,
SqlDevelopColumns
}
from
'./model.data'
;
import
{
entityColumns
,
entityFormSchema
,
SqlDevelopColumns
}
from
'./model.data'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
TreeData
}
from
'@/views/dataWarehousePlanning/
log
icalModel/modelData'
;
import
{
TreeData
}
from
'@/views/dataWarehousePlanning/
phys
icalModel/modelData'
;
import
{
import
{
entityData
,
entityData
,
sqlDevelop
,
sqlDevelopData
,
}
from
'@/views/dataWarehousePlanning/logicalModel/modelDetail/modelData'
;
}
from
'@/views/dataWarehousePlanning/physicalModel/modelDetail/modelData'
;
import
EntityModel
from
'./entityModel.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
DeleteTwoTone
,
PlusOutlined
}
from
'@ant-design/icons-vue'
;
import
{
DeleteTwoTone
,
PlusOutlined
}
from
'@ant-design/icons-vue'
;
...
@@ -66,7 +65,7 @@
...
@@ -66,7 +65,7 @@
function
handleEntityEditModel
(
record
:
Recordable
)
{
function
handleEntityEditModel
(
record
:
Recordable
)
{
// 跳转到详情
// 跳转到详情
push
({
push
({
path
:
'/dataWarehousePlanning/
log
icalModel/entity-detail'
,
path
:
'/dataWarehousePlanning/
phys
icalModel/entity-detail'
,
query
:
record
,
query
:
record
,
});
});
}
}
...
@@ -99,10 +98,10 @@
...
@@ -99,10 +98,10 @@
pageNu
:
'1'
,
pageNu
:
'1'
,
pageSize
:
'10'
,
pageSize
:
'10'
,
pages
:
'1'
,
pages
:
'1'
,
total
:
sqlDevelop
.
length
,
total
:
sqlDevelop
Data
.
length
,
code
:
''
,
code
:
''
,
message
:
''
,
message
:
''
,
data
:
sqlDevelop
,
data
:
sqlDevelop
Data
,
};
};
return
{
...
response
};
return
{
...
response
};
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment