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
cf12e168
Commit
cf12e168
authored
Dec 10, 2024
by
LiXuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
03dae5db
594df71b
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1198 additions
and
1188 deletions
+1198
-1188
BasicStandardsTree.vue
...views/dataStandards/basicStandards/BasicStandardsTree.vue
+198
-200
VersionModal.vue
src/views/dataStandards/basicStandards/VersionModal.vue
+92
-88
basicStandards.data.ts
...views/dataStandards/basicStandards/basicStandards.data.ts
+227
-232
detailStandard.vue
src/views/dataStandards/basicStandards/detailStandard.vue
+152
-136
index.vue
src/views/dataStandards/basicStandards/index.vue
+97
-69
relatedQualityModal.vue
...iews/dataStandards/basicStandards/relatedQualityModal.vue
+66
-45
relatedRelationships.vue
...ews/dataStandards/basicStandards/relatedRelationships.vue
+365
-414
data.ts
src/views/realTimeSync/dataBaseToDataBase/data.ts
+0
-3
optionPage.vue
src/views/realTimeSync/dataBaseToDataBase/optionPage.vue
+1
-1
No files found.
src/views/dataStandards/basicStandards/BasicStandardsTree.vue
View file @
cf12e168
...
...
@@ -25,147 +25,157 @@
<CreateStandardsType
@
register=
"registerCreateStandardsTypeModal"
@
success=
"handleSuccess"
/>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
h
,
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicTree
,
ContextMenuItem
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
Nullable
}
from
"@vben/types"
;
import
{
TreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
EventDataNode
}
from
"ant-design-vue/es/vc-tree/interface"
;
import
{
PlusOutlined
,
EllipsisOutlined
}
from
"@ant-design/icons-vue"
;
import
{
useMessage
}
from
"@/hooks/web/useMessage"
;
import
{
Modal
}
from
"ant-design-vue"
;
import
{
useModal
}
from
"@/components/Modal"
;
import
{
router
}
from
"@/router"
;
import
CreateBasicStandards
from
'./createBasicStandards.vue'
;
import
CreateStandardsType
from
'./createStandardsType.vue'
;
import
MoveModal
from
'./MoveModal.vue'
;
import
CopyModal
from
'./CopyModal.vue'
;
defineOptions
({
name
:
'DeptTree'
});
const
emit
=
defineEmits
([
'select'
]);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerMoveModal
,
{
openModal
:
openMoveModal
}]
=
useModal
();
const
[
registerCopyModal
,
{
openModal
:
openCopyModal
}]
=
useModal
();
const
[
registerCreateBasicStandardsModal
,
{
openModal
:
openCreateBasicStandardsModal
}]
=
useModal
();
const
[
registerCreateStandardsTypeModal
,
{
openModal
:
openCreateStandardsTypeModal
}]
=
useModal
();
function
getTree
()
{
import
{
h
,
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicTree
,
ContextMenuItem
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
Nullable
}
from
'@vben/types'
;
import
{
TreeData
}
from
'@/views/dataStandards/basicStandards/basicStandardsData'
;
import
{
EventDataNode
}
from
'ant-design-vue/es/vc-tree/interface'
;
import
{
PlusOutlined
,
EllipsisOutlined
}
from
'@ant-design/icons-vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
Modal
}
from
'ant-design-vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
router
}
from
'@/router'
;
import
CreateBasicStandards
from
'./createBasicStandards.vue'
;
import
CreateStandardsType
from
'./createStandardsType.vue'
;
import
MoveModal
from
'./MoveModal.vue'
;
import
CopyModal
from
'./CopyModal.vue'
;
defineOptions
({
name
:
'DeptTree'
});
const
emit
=
defineEmits
([
'select'
]);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerMoveModal
,
{
openModal
:
openMoveModal
}]
=
useModal
();
const
[
registerCopyModal
,
{
openModal
:
openCopyModal
}]
=
useModal
();
const
[
registerCreateBasicStandardsModal
,
{
openModal
:
openCreateBasicStandardsModal
}]
=
useModal
();
const
[
registerCreateStandardsTypeModal
,
{
openModal
:
openCreateStandardsTypeModal
}]
=
useModal
();
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
)
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
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
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
handleSelect
(
keys
)
{
/**选中的数据*/
function
handleSelect
(
keys
)
{
emit
(
'select'
,
keys
[
0
]);
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
fetch
();
});
});
// 树的操作列表
const
actionList
=
[
// 树的操作列表
const
actionList
=
[
{
//全部操作按钮
render
:
(
node
)
=>
{
return
h
(
EllipsisOutlined
,
{
class
:
'ml-2'
,
onClick
:
()
=>
{
getRightMenuList
(
node
)
getRightMenuList
(
node
);
},
});
},
},
];
];
function
getRightMenuList
(
node
:
EventDataNode
):
Promise
<
ContextMenuItem
[]
>
{
function
getRightMenuList
(
node
:
EventDataNode
):
Promise
<
ContextMenuItem
[]
>
{
const
menu
=
[
{
label
:
'查看详情'
,
handler
:
()
=>
{
detailButton
(
node
)
detailButton
(
node
);
},
icon
:
'ant-design:file-search-outlined'
,
},
{
label
:
'编辑'
,
handler
:
()
=>
{
editButton
(
node
)
editButton
(
node
);
},
icon
:
'ant-design:edit-outlined'
,
},
{
label
:
'标准分类信息'
,
handler
:
()
=>
{
standardsTypeButton
(
node
)
createStandardsTypeButton
(
node
);
},
icon
:
'ant-design:file-text-twotone'
,
},
{
label
:
'新建标准分类'
,
handler
:
()
=>
{
createStandardsTypeButton
(
node
)
createStandardsTypeButton
(
node
);
},
icon
:
'ant-design:file-add-outlined'
,
},
{
label
:
'新建基础标准'
,
handler
:
()
=>
{
createBasicStandardsButton
(
node
)
createBasicStandardsButton
(
node
);
},
icon
:
'ant-design:file-add-outlined'
,
},
{
label
:
'复制到'
,
handler
:
()
=>
{
copyButton
()
copyButton
();
},
icon
:
'ant-design:snippets-twotone'
,
},
{
label
:
'删除'
,
handler
:
()
=>
{
deleteButton
(
node
)
deleteButton
(
node
);
},
icon
:
'ant-design:rest-outlined'
,
},
{
label
:
'移动'
,
handler
:
()
=>
{
MoveButton
()
MoveButton
();
},
icon
:
'ant-design:folder-open-outlined'
,
},
...
...
@@ -173,48 +183,44 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> {
return
new
Promise
((
resolve
)
=>
{
resolve
(
menu
);
});
}
}
/**查看详情*/
function
detailButton
(
record
)
{
/**查看详情*/
function
detailButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/basicStandards/detailStandard'
,
query
:
{
businessId
:
record
.
businessId
,
businessId
:
record
.
businessId
,
},
});
}
/**移动*/
function
MoveButton
()
{
openMoveModal
(
true
,
{
}
});
}
/**移动*/
function
MoveButton
()
{
openMoveModal
(
true
,
{});
}
/**新建标准分类*/
function
createStandardsTypeButton
(
record
)
{
/**新建标准分类*/
function
createStandardsTypeButton
(
record
)
{
openCreateStandardsTypeModal
(
true
,
{
record
record
,
});
}
}
/**新建基础标准*/
function
createBasicStandardsButton
(
record
)
{
/**新建基础标准*/
function
createBasicStandardsButton
(
record
)
{
openCreateBasicStandardsModal
(
true
,
{
record
record
,
});
}
/**复制到 按钮*/
function
copyButton
()
{
openCopyModal
(
true
,
{
}
});
}
/**复制到 按钮*/
function
copyButton
()
{
openCopyModal
(
true
,
{});
}
/**删除 按钮*/
function
deleteButton
(
record
:
Recordable
)
{
/**删除 按钮*/
function
deleteButton
(
record
:
Recordable
)
{
createConfirm
({
iconType
:
'warning'
,
title
:
'确认删除'
,
...
...
@@ -223,29 +229,21 @@ function deleteButton(record: Recordable) {
createMessage
.
success
(
'删除成功!'
);
},
});
}
/** 修改 按钮*/
function
handleUpdateButton
(
record
:
Recordable
)
{
}
}
/** 修改 按钮*/
function
handleUpdateButton
(
record
:
Recordable
)
{}
/**编辑标准*/
function
editButton
(
record
)
{
/**编辑标准*/
function
editButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/basicStandards/editDetailStandard'
,
query
:
{
businessId
:
record
.
businessId
,
businessId
:
record
.
businessId
,
},
});
}
/**标准分类信息*/
function
standardsTypeButton
(
record
:
Recordable
)
{
createMessage
.
success
(
'标准分类信息'
)
}
/** 成功回调*/
function
handleSuccess
()
{
}
}
/** 成功回调*/
function
handleSuccess
()
{}
</
script
>
src/views/dataStandards/basicStandards/VersionModal.vue
View file @
cf12e168
...
...
@@ -11,7 +11,11 @@
},
{
label: '撤回',
onClick: withdrawButton.bind(null, record),
popConfirm: {
title: '是否撤回该版本?',
placement: 'left',
confirm: withdrawButton.bind(null, record),
},
},
{
// icon: 'clarity:note-edit-line',
...
...
@@ -26,56 +30,58 @@
</BasicModal>
</template>
<
script
lang=
"ts"
setup
>
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicModal
,
useModalInner
,
useModal
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
reactive
,
unref
,
onDeactivated
,
onMounted
,
ref
,
computed
}
from
'vue'
;
import
{
reactive
,
unref
,
onDeactivated
,
onMounted
,
ref
,
computed
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
searchFormSchema
,
versionColumns
,
versionData
}
from
'./basicStandardsData'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
downloadByData
}
from
'@/utils/file/download'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
useUserStore
}
from
"@/store/modules/user"
;
import
{
userData
}
from
"@/views/system/institution/institutionData"
;
import
{
router
}
from
"@/router"
;
import
{
useUserStore
}
from
'@/store/modules/user'
;
import
{
userData
}
from
'@/views/system/institution/institutionData'
;
import
{
router
}
from
'@/router'
;
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
}
=
useMessage
();
const
filterStore
=
useFilterStore
();
const
route
=
useRoute
();
const
go
=
useGo
();
const
[
registerMoveUser
,
{
openModal
:
openMoveUserModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
getTitle
=
computed
(()
=>
(
'版本管理'
));
const
tableData
=
ref
([])
const
isAdd
=
ref
(
true
)
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
useTable
({
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
}
=
useMessage
();
const
filterStore
=
useFilterStore
();
const
route
=
useRoute
();
const
go
=
useGo
();
const
[
registerMoveUser
,
{
openModal
:
openMoveUserModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
getTitle
=
computed
(()
=>
'版本管理'
);
const
tableData
=
ref
([]);
const
isAdd
=
ref
(
true
);
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
},
]
=
useTable
({
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
pageNu
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
tableData
.
value
.
length
,
code
:
''
,
message
:
''
,
code
:
''
,
message
:
''
,
data
:
[],
};
var
data
=
[]
data
=
tableData
.
value
if
(
params
.
name
!=
undefined
&&
params
.
name
!=
''
&&
params
.
name
!=
null
)
{
var
data
=
[];
data
=
tableData
.
value
;
if
(
params
.
name
!=
undefined
&&
params
.
name
!=
''
&&
params
.
name
!=
null
)
{
//过滤出名字包含params.name的数据
data
=
data
.
filter
((
item
)
=>
item
.
name
.
includes
(
params
.
name
));
}
if
(
params
.
username
!=
undefined
&&
params
.
username
!=
''
&&
params
.
username
!=
null
)
{
if
(
params
.
username
!=
undefined
&&
params
.
username
!=
''
&&
params
.
username
!=
null
)
{
data
=
data
.
filter
((
item
)
=>
item
.
username
.
includes
(
params
.
username
));
}
return
{
...
response
,
data
:
data
};
},
rowKey
:
'businessId'
,
columns
:
versionColumns
,
columns
:
versionColumns
,
rowSelection
:
true
,
formConfig
:
{
labelWidth
:
100
,
...
...
@@ -94,39 +100,37 @@ const [registerTable, { reload, updateTableDataRecord, getSearchInfo,getForm,get
handleSearchInfoFn
(
info
)
{
return
info
;
},
});
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
setModalProps
({
confirmLoading
:
false
,
showOkBtn
:
false
,
showCancelBtn
:
false
});
setModalProps
({
confirmLoading
:
false
,
showOkBtn
:
false
,
showCancelBtn
:
false
});
isAdd
.
value
=
!!
data
?.
isAdd
;
});
/** 对比成功*/
function
contrastButton
()
{
closeModal
()
/** 对比成功*/
function
contrastButton
()
{
closeModal
();
router
.
push
({
path
:
'/dataStandards/basicStandards/basicStandardsContrast'
,
query
:
{
businessId
:
route
.
query
.
businessId
,
businessId
:
route
.
query
.
businessId
,
},
});
}
}
/** 撤回成功*/
function
withdrawButton
()
{
createMessage
.
success
(
'撤回成功!'
)
}
/** 撤回成功*/
function
withdrawButton
()
{
createMessage
.
success
(
'撤回成功!'
);
}
/** 查看*/
function
detailButton
(
record
)
{
emit
(
'success'
,
{
values
:
{
...
record
}
});
/** 查看*/
function
detailButton
(
record
)
{
emit
(
'success'
,
{
values
:
{
...
record
}
});
closeModal
();
}
}
onMounted
(()
=>
{
tableData
.
value
=
versionData
});
onMounted
(()
=>
{
tableData
.
value
=
versionData
;
});
</
script
>
src/views/dataStandards/basicStandards/basicStandards.data.ts
View file @
cf12e168
This diff is collapsed.
Click to expand it.
src/views/dataStandards/basicStandards/detailStandard.vue
View file @
cf12e168
<
template
>
<div
style=
"background-color: white"
>
<div
style=
"display:flex;margin-top: 15px;margin-bottom: 15px;justify-content: space-between; align-items: center;"
v-if=
"isShow"
>
<div
style=
"margin-left: 15px;font-size: 15px;font-weight: bold"
>
<div
style=
"
display: flex;
margin-top: 15px;
margin-bottom: 15px;
justify-content: space-between;
align-items: center;
"
v-if=
"isShow"
>
<div
style=
"margin-left: 15px; font-size: 15px; font-weight: bold"
>
查看版本
<Select
v-model:value=
"optionValue"
...
...
@@ -10,7 +19,7 @@
style=
"width: 200px"
:options=
"options"
@
change=
"handleChange"
></Select
>
/
>
</div>
<div>
<a-button
type=
"primary"
@
click=
"contrastButton"
>
版本对比
</a-button>
...
...
@@ -19,16 +28,34 @@
</div>
</div>
<Divider
/>
<div
style=
"display: flex;justify-content: space-between; align-items: center;margin-bottom: 10px;margin-left: 12px"
>
<div
style=
"margin-top: 10px;display: flex;font-weight: bold;font-size: 25px;margin-left: 10px"
>
{{
title
}}
<div
style=
"font-size: 15px;padding-top: 15px;padding-left: 10px"
>
版本:
{{
optionValue
}}
<div
style=
"
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
margin-left: 12px;
"
>
<div
style=
"
margin-top: 10px;
display: flex;
font-weight: bold;
font-size: 25px;
margin-left: 10px;
"
>
{{
title
}}
<div
style=
"font-size: 15px; padding-top: 15px; padding-left: 10px"
>
版本:
{{
optionValue
}}
</div>
</div>
<div
style=
"margin-top: 10px;display: flex"
v-if=
"!isShow"
>
<div
style=
"margin-top: 10px;
display: flex"
v-if=
"!isShow"
>
<a-button
type=
"primary"
@
click=
"editButton"
>
编辑标准
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 10px"
@
click=
"versionButton"
>
版本管理
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 10px"
@
click=
"versionButton"
>
版本管理
</a-button
>
</div>
</div>
<Divider
/>
...
...
@@ -39,37 +66,33 @@
<BasicForm
@
register=
"registerForm3"
/>
<Divider
/>
<!-- 版本管理 弹窗-->
<!-- 版本管理 弹窗-->
<VersionModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
Select
}
from
'ant-design-vue'
;
import
{
Description
}
from
'@/components/Description'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
Divider
}
from
'ant-design-vue'
;
import
{
TreeData
}
from
'./basicStandardsData'
;
import
{
router
}
from
"@/router"
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
detailSchema1
,
detailSchema2
,
detailSchema3
}
from
'./basicStandards.data'
;
import
{
onMounted
,
ref
}
from
"vue"
;
import
{
useRoute
}
from
"vue-router"
;
import
VersionModal
from
'@/views/dataStandards/basicStandards/VersionModal.vue'
import
{
useModal
}
from
"@/components/Modal"
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
const
route
=
useRoute
()
const
title
=
ref
(
''
)
const
formData
=
ref
({})
const
businessId
=
ref
(
''
)
const
isShow
=
ref
(
false
)
const
optionValue
=
ref
(
''
)
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerForm1
,
{
setFieldsValue
:
setFieldsValue1
}]
=
useForm
({
import
{
Select
,
Divider
}
from
'ant-design-vue'
;
import
{
Description
}
from
'@/components/Description'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
TreeData
}
from
'./basicStandardsData'
;
import
{
router
}
from
'@/router'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
detailSchema1
,
detailSchema2
,
detailSchema3
}
from
'./basicStandards.data'
;
import
{
onMounted
,
ref
}
from
'vue'
;
import
{
useRoute
}
from
'vue-router'
;
import
VersionModal
from
'@/views/dataStandards/basicStandards/VersionModal.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
const
route
=
useRoute
();
const
title
=
ref
(
''
);
const
formData
=
ref
({});
const
businessId
=
ref
(
''
);
const
isShow
=
ref
(
false
);
const
optionValue
=
ref
(
''
);
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerForm1
,
{
setFieldsValue
:
setFieldsValue1
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
detailSchema1
,
...
...
@@ -77,9 +100,9 @@ const [registerForm1, { setFieldsValue: setFieldsValue1 }] = useForm({
actionColOptions
:
{
span
:
23
,
},
});
});
const
[
registerForm2
,
{
setFieldsValue
:
setFieldsValue2
}]
=
useForm
({
const
[
registerForm2
,
{
setFieldsValue
:
setFieldsValue2
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
detailSchema2
,
...
...
@@ -87,9 +110,9 @@ const [registerForm2, { setFieldsValue: setFieldsValue2 }] = useForm({
actionColOptions
:
{
span
:
23
,
},
});
});
const
[
registerForm3
,
{
setFieldsValue
:
setFieldsValue3
}]
=
useForm
({
const
[
registerForm3
,
{
setFieldsValue
:
setFieldsValue3
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
detailSchema3
,
...
...
@@ -97,48 +120,44 @@ const [registerForm3, { setFieldsValue: setFieldsValue3 }] = useForm({
actionColOptions
:
{
span
:
23
,
},
});
});
const
options
=
ref
<
any
>
([
const
options
=
ref
<
any
>
([
{
value
:
'V1'
,
label
:
'V1'
},
{
value
:
'V2'
,
label
:
'V2'
},
{
value
:
'V3'
,
label
:
'V3'
},
]);
]);
/**编辑标准*/
function
editButton
(
record
)
{
/**编辑标准*/
function
editButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/basicStandards/editDetailStandard'
,
query
:
{
businessId
:
businessId
.
value
,
businessId
:
businessId
.
value
,
},
});
}
}
/**基本标准对比*/
function
contrastButton
(
record
)
{
/**基本标准对比*/
function
contrastButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/basicStandards/basicStandardsContrast'
,
query
:
{
businessId
:
businessId
.
value
,
businessId
:
businessId
.
value
,
},
});
}
/**版本管理 弹窗*/
function
versionButton
(
record
)
{
openModal
(
true
,
{
});
}
}
/**下拉框改变事件*/
function
handleChange
(
value
)
{
/**版本管理 弹窗*/
function
versionButton
(
record
)
{
openModal
(
true
,
{});
}
}
/**下拉框改变事件*/
function
handleChange
(
value
)
{}
/**回滚*/
function
resetButton
(
value
)
{
/**回滚*/
function
resetButton
(
value
)
{
createConfirm
({
iconType
:
'warning'
,
title
:
'确认回滚'
,
...
...
@@ -147,43 +166,40 @@ function resetButton(value) {
createMessage
.
success
(
'回滚成功!'
);
},
});
}
/**退出查看*/
function
exitButton
(
record
)
{
isShow
.
value
=
false
optionValue
.
value
=
'V3'
}
/**版本管理 弹出回调函数*/
function
handleSuccess
(
record
)
{
optionValue
.
value
=
record
.
values
.
versionName
isShow
.
value
=
true
}
/**初始化*/
onMounted
(()
=>
{
optionValue
.
value
=
'V3'
businessId
.
value
=
route
.
query
.
businessId
const
data
=
TreeData
.
filter
(
item
=>
item
.
businessId
==
businessId
.
value
)
title
.
value
=
data
[
0
].
standardChineseName
}
/**退出查看*/
function
exitButton
(
record
)
{
isShow
.
value
=
false
;
optionValue
.
value
=
'V3'
;
}
/**版本管理 弹出回调函数*/
function
handleSuccess
(
record
)
{
optionValue
.
value
=
record
.
values
.
versionName
;
isShow
.
value
=
true
;
}
/**初始化*/
onMounted
(()
=>
{
optionValue
.
value
=
'V3'
;
businessId
.
value
=
route
.
query
.
businessId
;
const
data
=
TreeData
.
filter
((
item
)
=>
item
.
businessId
==
businessId
.
value
);
title
.
value
=
data
[
0
].
standardChineseName
;
setFieldsValue1
({
...
data
[
0
]
})
...
data
[
0
],
});
setFieldsValue2
({
...
data
[
0
]
})
...
data
[
0
],
});
setFieldsValue3
({
...
data
[
0
]
})
});
...
data
[
0
],
});
});
</
script
>
<
style
lang=
"less"
scoped
>
.desc-wrap {
.desc-wrap {
padding: 16px;
background-color: @component-background;
}
}
</
style
>
src/views/dataStandards/basicStandards/index.vue
View file @
cf12e168
This diff is collapsed.
Click to expand it.
src/views/dataStandards/basicStandards/relatedQualityModal.vue
View file @
cf12e168
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<BasicTable
@
register=
"registerTable1"
/>
<BasicTable
@
register=
"registerTable1"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
,
reactive
}
from
'vue'
;
import
{
ref
,
computed
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
relatedQualityColumns
,
relatedQualitySchema
,
relatedRelationshipColumns1
}
from
'./basicStandards.data'
;
import
{
relatedQualityColumns
,
relatedQualitySchema
,
relatedRelationshipColumns1
,
}
from
'./basicStandards.data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
qualityTreeData
,
relatedQualityData
,
relatedRelationshipsData1
,
TreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
TreeData
,
}
from
'@/views/dataStandards/basicStandards/basicStandardsData'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
rowId
=
ref
(
''
);
const
getTitle
=
computed
(()
=>
(
'关联质量模版'
));
const
tableData
=
ref
([]);
const
getTitle
=
computed
(()
=>
'关联质量模版'
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
const
[
registerForm
,
{
setFieldsValue
,
getFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
relatedQualitySchema
,
...
...
@@ -40,65 +53,73 @@
setModalProps
({
confirmLoading
:
false
});
setFieldsValue
({
...
data
.
record
,
})
const
treeList
=
handleTree
(
qualityTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
})
;
const
treeList
=
handleTree
(
qualityTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
);
updateSchema
([
{
field
:
'QualityId'
,
componentProps
:
{
treeData
:
treeList
treeData
:
treeList
,
},
},
]);
});
const
[
registerTable1
]
=
useTable
({
const
[
registerTable1
,
{
reload
}
]
=
useTable
({
title
:
'参数配置'
,
api
:
async
(
params
)
=>
{
api
:
async
()
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
pageNu
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
0
,
code
:
''
,
message
:
''
,
data
:
[]
,
code
:
''
,
message
:
''
,
data
:
tableData
.
value
,
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
[]
};
return
{
...
response
};
},
columns
:
relatedQualityColumns
,
columns
:
relatedQualityColumns
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
bordered
:
true
,
});
/**确定按钮*/
async
function
handleSubmit
()
{
createMessage
.
success
(
'移动成功'
);
closeModal
()
closeModal
()
;
}
/**数组对象转成树*/
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
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
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
;
}
</
script
>
src/views/dataStandards/basicStandards/relatedRelationships.vue
View file @
cf12e168
This diff is collapsed.
Click to expand it.
src/views/realTimeSync/dataBaseToDataBase/data.ts
View file @
cf12e168
...
...
@@ -283,9 +283,6 @@ export const mappingRuleConfigurationColumns: BasicColumn[] = [
title
:
'规则详情'
,
dataIndex
:
'ruleDetail'
,
width
:
200
,
edit
:
true
,
editable
:
true
,
editComponent
:
'Input'
,
},
{
title
:
'执行顺序'
,
...
...
src/views/realTimeSync/dataBaseToDataBase/optionPage.vue
View file @
cf12e168
...
...
@@ -709,7 +709,7 @@
const
isEdit
=
ref
(
true
);
const
version
=
ref
(
'V1'
);
const
isStart
=
ref
(
'false'
);
const
selectedItem
=
ref
();
const
selectedItem
=
ref
(
'1'
);
const
versionOptions
=
[
{
label
:
'V1'
,
...
...
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