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
0e4cee7a
Commit
0e4cee7a
authored
Nov 08, 2024
by
LiXuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
逻辑模型详情
parent
d549c64d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
198 additions
and
185 deletions
+198
-185
index.ts
src/router/routes/index.ts
+3
-3
index.vue
src/views/dataWarehousePlanning/logicalModel/index.vue
+174
-168
model.data.ts
src/views/dataWarehousePlanning/logicalModel/model.data.ts
+14
-5
ModelTree.vue
...aWarehousePlanning/logicalModel/modelDetail/ModelTree.vue
+1
-1
modelEdit.vue
...aWarehousePlanning/logicalModel/modelDetail/modelEdit.vue
+5
-7
modelModal.vue
...WarehousePlanning/logicalModel/modelDetail/modelModal.vue
+1
-1
No files found.
src/router/routes/index.ts
View file @
0e4cee7a
...
@@ -118,11 +118,11 @@ export const DataWarehousePlanningRoute: AppRouteRecordRaw = {
...
@@ -118,11 +118,11 @@ export const DataWarehousePlanningRoute: AppRouteRecordRaw = {
},
},
children
:
[
children
:
[
{
{
path
:
'logicalModel/
edit
'
,
path
:
'logicalModel/
detail
'
,
name
:
'logicalModel'
,
name
:
'logicalModel'
,
component
:
()
=>
import
(
'@/views/dataWarehousePlanning/logicalModel/model
Edit
/index.vue'
),
component
:
()
=>
import
(
'@/views/dataWarehousePlanning/logicalModel/model
Detail
/index.vue'
),
meta
:
{
meta
:
{
title
:
'
编辑逻辑模型
'
,
title
:
'
逻辑模型详情
'
,
icon
:
''
,
icon
:
''
,
},
},
},
},
...
...
src/views/dataWarehousePlanning/logicalModel/index.vue
View file @
0e4cee7a
...
@@ -3,8 +3,15 @@
...
@@ -3,8 +3,15 @@
<ModelTree
class=
"w-1/4 xl:w-1/5"
@
select=
"handleSelect"
/>
<ModelTree
class=
"w-1/4 xl:w-1/5"
@
select=
"handleSelect"
/>
<BasicTable
@
register=
"registerTable"
class=
"w-3/4 xl:w-4/5"
:searchInfo=
"searchInfo"
>
<BasicTable
@
register=
"registerTable"
class=
"w-3/4 xl:w-4/5"
:searchInfo=
"searchInfo"
>
<template
#
toolbar
>
<template
#
toolbar
>
<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=
"handleImport"
>
导入
</a-button>
<a-button
type=
"primary"
@
click=
"handleExport"
>
导出
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreateFile"
>
新建文件夹
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreateFile"
>
新建文件夹
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreateModel"
>
新建元模型
</a-button>
<a-button
type=
"primary"
@
click=
"handleCreateModel"
>
新建文件
</a-button>
<a-button
type=
"primary"
>
删除
</a-button>
</
template
>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<template
v-if=
"column.key === 'action'"
>
...
@@ -41,37 +48,37 @@
...
@@ -41,37 +48,37 @@
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
reactive
,
onMounted
,
ref
}
from
'vue'
;
import
{
reactive
,
onMounted
,
ref
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
ModelTree
from
'./ModelTree.vue'
;
import
ModelTree
from
'./ModelTree.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
ModelModal
from
'./modelModal.vue'
;
import
ModelModal
from
'./modelModal.vue'
;
import
ModelEdit
from
'./modelEdit.vue'
;
import
ModelEdit
from
'./modelEdit.vue'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
,
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
columns
,
searchFormSchema
}
from
'./model.data'
;
import
{
columns
,
searchFormSchema
}
from
'./model.data'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
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'
;
defineOptions
({
name
:
'AccountManagement'
});
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
filterStore
=
useFilterStore
();
const
filterStore
=
useFilterStore
();
const
route
=
useRoute
();
const
route
=
useRoute
();
const
go
=
useGo
();
const
go
=
useGo
();
const
{
push
}
=
useRouter
();
const
{
push
}
=
useRouter
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModelEdit
,
{
openModal
:
openEditUserModal
}]
=
useModal
();
const
[
registerModelEdit
,
{
openModal
:
openEditUserModal
}]
=
useModal
();
const
[
registerAddUserModal
,
{
openModal
:
addUserModal
}]
=
useModal
();
const
[
registerAddUserModal
,
{
openModal
:
addUserModal
}]
=
useModal
();
const
[
registerMoveUser
,
{
openModal
:
openMoveUserModal
}]
=
useModal
();
const
[
registerMoveUser
,
{
openModal
:
openMoveUserModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
searchInfo
=
reactive
<
Recordable
>
({});
const
tableData
=
ref
([]);
const
tableData
=
ref
([]);
const
[
const
[
registerTable
,
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
},]
=
useTable
({
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
},
title
:
''
,
]
=
useTable
({
title
:
'逻辑模型'
,
api
:
async
(
params
)
=>
{
api
:
async
(
params
)
=>
{
console
.
log
(
'params:'
,
params
);
console
.
log
(
'params:'
,
params
);
const
response
=
{
const
response
=
{
...
@@ -84,9 +91,8 @@ const [
...
@@ -84,9 +91,8 @@ const [
data
:
[],
data
:
[],
};
};
//过滤data中的数据,取出等于params.deptId的数据
//过滤data中的数据,取出等于params.deptId的数据
var
data
=
[];
//按照部门筛选 如果有进行过滤相应部门的 没有就赋值全部
//按照部门筛选 如果有进行过滤相应部门的 没有就赋值全部
var
data
=
[];
let
data
=
[];
data
=
tableData
.
value
.
filter
((
item
)
=>
item
.
businessId
!==
100
);
data
=
tableData
.
value
.
filter
((
item
)
=>
item
.
businessId
!==
100
);
return
{
...
response
,
data
:
data
};
return
{
...
response
,
data
:
data
};
},
},
...
@@ -112,50 +118,50 @@ const [
...
@@ -112,50 +118,50 @@ const [
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'action'
,
dataIndex
:
'action'
,
},
},
});
});
/** 新增元模型*/
/** 新增元模型*/
function
handleCreateModel
()
{
function
handleCreateModel
()
{
openModal
(
true
,
{
openModal
(
true
,
{
isUpdate
:
false
,
isUpdate
:
false
,
});
});
}
}
/** 新增文件夹*/
/** 新增文件夹*/
function
handleCreateFile
()
{
function
handleCreateFile
()
{
open
Modal
(
true
,
{
openEditUser
Modal
(
true
,
{
isUpdate
:
false
,
isUpdate
:
false
,
});
});
}
}
/** 移动按钮*/
/** 移动按钮*/
function
handleMove
(
record
:
Recordable
)
{
function
handleMove
(
record
:
Recordable
)
{
openMoveUserModal
(
true
,
{
openMoveUserModal
(
true
,
{
record
,
record
,
isMove
:
true
,
isMove
:
true
,
});
});
}
}
/** 编辑按钮*/
/** 编辑按钮*/
function
handleEdit
(
record
:
Recordable
)
{
function
handleEdit
(
record
:
Recordable
)
{
openEditUserModal
(
true
,
{
openEditUserModal
(
true
,
{
record
,
record
,
isUpdate
:
true
,
isUpdate
:
true
,
});
});
}
}
/** 删除按钮*/
/** 删除按钮*/
function
handleDelete
(
record
:
Recordable
)
{
function
handleDelete
(
record
:
Recordable
)
{
tableData
.
value
.
splice
(
tableData
.
value
.
splice
(
tableData
.
value
.
findIndex
((
item
)
=>
item
.
businessId
===
record
.
businessId
),
tableData
.
value
.
findIndex
((
item
)
=>
item
.
businessId
===
record
.
businessId
),
1
,
1
,
);
);
createMessage
.
success
(
'删除成功!'
);
createMessage
.
success
(
'删除成功!'
);
reload
();
reload
();
}
}
/** 新增/编辑成功*/
/** 新增/编辑成功*/
function
handleSuccess
({
isUpdate
,
values
})
{
function
handleSuccess
({
isUpdate
,
values
})
{
if
(
isUpdate
)
{
if
(
isUpdate
)
{
// 注意:updateTableDataRecord要求表格的rowKey属性为string并且存在于每一行的record的keys中
// 注意:updateTableDataRecord要求表格的rowKey属性为string并且存在于每一行的record的keys中
//修改表单的值
//修改表单的值
...
@@ -165,18 +171,18 @@ function handleSuccess({ isUpdate, values }) {
...
@@ -165,18 +171,18 @@ function handleSuccess({ isUpdate, values }) {
tableData
.
value
.
push
(
values
);
tableData
.
value
.
push
(
values
);
reload
();
reload
();
}
}
}
}
/** 进入编辑逻辑模型 */
/** 进入编辑逻辑模型 */
function
goEdit
(
record
)
{
function
goEdit
(
record
)
{
console
.
log
(
'record:'
,
record
)
console
.
log
(
'record:'
,
record
);
push
({
push
({
path
:
'/dataWarehousePlanning/logicalModel/edit
'
,
path
:
'/dataWarehousePlanning/logicalModel/detail
'
,
query
:
record
,
query
:
record
,
});
});
}
}
/** 移动*/
/** 移动*/
function
handleMoveSuccess
({
isMove
,
values
})
{
function
handleMoveSuccess
({
isMove
,
values
})
{
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
const
rowSelection
=
getRowSelection
().
selectedRowKeys
;
if
(
rowSelection
.
length
>
0
)
{
if
(
rowSelection
.
length
>
0
)
{
//批量移动
//批量移动
...
@@ -188,19 +194,19 @@ function handleMoveSuccess({ isMove, values }) {
...
@@ -188,19 +194,19 @@ function handleMoveSuccess({ isMove, values }) {
const
result
=
updateTableDataRecord
(
values
.
businessId
,
values
);
const
result
=
updateTableDataRecord
(
values
.
businessId
,
values
);
}
}
reload
();
reload
();
}
}
/** 部门树的select*/
/** 部门树的select*/
function
handleSelect
(
modelId
=
''
)
{
function
handleSelect
(
modelId
=
''
)
{
searchInfo
.
modelId
=
modelId
;
searchInfo
.
modelId
=
modelId
;
reload
();
reload
();
}
}
function
handleView
(
record
:
Recordable
)
{
function
handleView
(
record
:
Recordable
)
{
go
(
'/system/account_detail/'
+
record
.
id
);
go
(
'/system/account_detail/'
+
record
.
id
);
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
tableData
.
value
=
TreeData
;
tableData
.
value
=
TreeData
;
const
path
=
route
.
path
;
const
path
=
route
.
path
;
if
(
filterStore
.
getSearchParams
[
path
])
{
if
(
filterStore
.
getSearchParams
[
path
])
{
...
@@ -215,8 +221,8 @@ onMounted(() => {
...
@@ -215,8 +221,8 @@ onMounted(() => {
searchInfo
.
institutionId
=
params
.
institutionId
;
searchInfo
.
institutionId
=
params
.
institutionId
;
}
}
}
}
});
});
onBeforeRouteLeave
((
to
,
from
,
next
)
=>
{
onBeforeRouteLeave
((
to
,
from
,
next
)
=>
{
const
params
=
Object
.
assign
({},
getSearchInfo
(),
getForm
().
getFieldsValue
());
const
params
=
Object
.
assign
({},
getSearchInfo
(),
getForm
().
getFieldsValue
());
filterStore
.
setSearchParams
({
filterStore
.
setSearchParams
({
path
:
from
.
path
,
path
:
from
.
path
,
...
@@ -225,5 +231,5 @@ onBeforeRouteLeave((to, from, next) => {
...
@@ -225,5 +231,5 @@ onBeforeRouteLeave((to, from, next) => {
},
},
});
});
next
();
// 允许导航
next
();
// 允许导航
});
});
</
script
>
</
script
>
src/views/dataWarehousePlanning/logicalModel/model.data.ts
View file @
0e4cee7a
...
@@ -52,12 +52,11 @@ export const columns: BasicColumn[] = [
...
@@ -52,12 +52,11 @@ export const columns: BasicColumn[] = [
export
const
searchFormSchema
:
FormSchema
[]
=
[
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
{
field
:
'name'
,
field
:
'name'
,
label
:
'名称'
,
component
:
'Input'
,
component
:
'Input'
,
componentProps
:
{
componentProps
:
{
placeholder
:
'
搜索主题域名称、英文名
'
,
placeholder
:
'
输入关键字搜索
'
,
},
},
colProps
:
{
span
:
7
},
colProps
:
{
span
:
4
},
},
},
];
];
export
const
searchFormTwoSchema
:
FormSchema
[]
=
[
export
const
searchFormTwoSchema
:
FormSchema
[]
=
[
...
@@ -84,11 +83,10 @@ export const modelFormSchema: any[] = [
...
@@ -84,11 +83,10 @@ export const modelFormSchema: any[] = [
},
},
getPopupContainer
:
()
=>
document
.
body
,
getPopupContainer
:
()
=>
document
.
body
,
},
},
required
:
true
,
},
},
{
{
field
:
'name'
,
field
:
'name'
,
label
:
'
元模型
名称'
,
label
:
'
文件
名称'
,
component
:
'Input'
,
component
:
'Input'
,
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
rules
:
[
rules
:
[
...
@@ -98,6 +96,17 @@ export const modelFormSchema: any[] = [
...
@@ -98,6 +96,17 @@ export const modelFormSchema: any[] = [
},
},
],
],
},
},
{
field
:
'type'
,
label
:
'文件类型'
,
component
:
'Input'
,
componentProps
:
{
defaultValue
:
'逻辑模型'
,
disabled
:
true
,
readOnly
:
true
,
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
];
];
export
const
editFormSchema
:
any
[]
=
[
export
const
editFormSchema
:
any
[]
=
[
{
{
...
...
src/views/dataWarehousePlanning/logicalModel/model
Edit
/ModelTree.vue
→
src/views/dataWarehousePlanning/logicalModel/model
Detail
/ModelTree.vue
View file @
0e4cee7a
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
{
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicTree
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
BasicTree
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
Nullable
}
from
'@vben/types'
;
import
{
Nullable
}
from
'@vben/types'
;
import
{
TreeData
}
from
'@/views/dataWarehousePlanning/logicalModel/model
Edit
/modelData'
;
import
{
TreeData
}
from
'@/views/dataWarehousePlanning/logicalModel/model
Detail
/modelData'
;
defineOptions
({
name
:
'DeptTree'
});
defineOptions
({
name
:
'DeptTree'
});
...
...
src/views/dataWarehousePlanning/logicalModel/model
Edit
/modelEdit.vue
→
src/views/dataWarehousePlanning/logicalModel/model
Detail
/modelEdit.vue
View file @
0e4cee7a
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
@
ok=
"handleSubmit"
@
ok=
"handleSubmit"
>
>
<Tabs
v-model:activeKey=
"planType"
size=
"large"
@
change=
"clickTab"
>
<Tabs
v-model:activeKey=
"planType"
size=
"large"
@
change=
"clickTab"
>
<a-tab-pane
key=
"基本信息"
tab=
"基本信息"
></a-tab-pane
>
<a-tab-pane
key=
"基本信息"
tab=
"基本信息"
/
>
<a-tab-pane
key=
"实体"
tab=
"实体"
></a-tab-pane
>
<a-tab-pane
key=
"实体"
tab=
"实体"
/
>
</Tabs>
</Tabs>
<BasicForm
@
register=
"registerForm"
/>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</BasicModal>
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
editFormSchema
,
modelFormSchema
}
from
'./model.data'
;
import
{
editFormSchema
,
modelFormSchema
}
from
'./model.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
'@/views/metaModel/knowledgeModel/modelData'
;
import
{
TreeData
}
from
'@/views/metaModel/knowledgeModel/modelData'
;
import
{
router
}
from
'@/router'
;
import
{
router
}
from
'@/router'
;
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
const
isUpdate
=
ref
(
true
);
const
isUpdate
=
ref
(
true
);
const
isMove
=
ref
(
false
);
const
isMove
=
ref
(
false
);
const
rowId
=
ref
(
''
);
const
rowId
=
ref
(
''
);
const
planType
=
ref
(
'基本信息'
)
const
planType
=
ref
(
'基本信息'
)
;
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
...
@@ -57,8 +57,7 @@
...
@@ -57,8 +57,7 @@
});
});
}
}
});
});
async
function
clickTab
(
value
){
async
function
clickTab
(
value
)
{}
}
const
getTitle
=
computed
(()
=>
'编辑文件夹'
);
const
getTitle
=
computed
(()
=>
'编辑文件夹'
);
/**确定按钮*/
/**确定按钮*/
...
@@ -72,4 +71,3 @@
...
@@ -72,4 +71,3 @@
closeModal
();
closeModal
();
}
}
</
script
>
</
script
>
src/views/dataWarehousePlanning/logicalModel/model
Edit
/modelModal.vue
→
src/views/dataWarehousePlanning/logicalModel/model
Detail
/modelModal.vue
View file @
0e4cee7a
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
modelFormSchema
}
from
'./model.data'
;
import
{
modelFormSchema
}
from
'./model.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
'@/views/dataWarehousePlanning/logicalModel/model
Edit
/modelData'
;
import
{
TreeData
}
from
'@/views/dataWarehousePlanning/logicalModel/model
Detail
/modelData'
;
import
{
router
}
from
'@/router'
;
import
{
router
}
from
'@/router'
;
defineOptions
({
name
:
'ModelModal'
});
defineOptions
({
name
:
'ModelModal'
});
...
...
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