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
7990f5f2
Commit
7990f5f2
authored
Nov 12, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
108dcc89
b7f5f4d3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
92 additions
and
16 deletions
+92
-16
ChooseDictonaryTree.vue
...iews/dataStandards/basicStandards/ChooseDictonaryTree.vue
+22
-2
VersionModal.vue
src/views/dataStandards/basicStandards/VersionModal.vue
+1
-2
basicStandardsData.ts
src/views/dataStandards/basicStandards/basicStandardsData.ts
+55
-8
editDetailStandard.vue
...views/dataStandards/basicStandards/editDetailStandard.vue
+14
-3
index.vue
src/views/dataStandards/basicStandards/index.vue
+0
-1
No files found.
src/views/dataStandards/basicStandards/ChooseDictonaryTree.vue
View file @
7990f5f2
...
...
@@ -10,7 +10,7 @@
:checkable=
"true"
:defaultExpandAll=
"true"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: '
label
' }"
:fieldNames=
"
{ key: 'businessId', title: '
basicStandardName
' }"
@select="handleSelect"
/>
</div>
...
...
@@ -28,7 +28,7 @@ import {nextTick, onMounted, ref, unref} from 'vue';
async
function
fetch
()
{
treeData
.
value
=
chooseDictoryTreeData
treeData
.
value
=
handleTree
(
chooseDictoryTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
await
nextTick
(()
=>
{
getTree
().
expandAll
(
true
)
})
...
...
@@ -49,6 +49,26 @@ function getTree() {
onMounted
(()
=>
{
fetch
();
});
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
}
</
script
>
<
style
lang=
"scss"
scoped
>
.bg-white
{
...
...
src/views/dataStandards/basicStandards/VersionModal.vue
View file @
7990f5f2
...
...
@@ -109,12 +109,11 @@ function contrastButton() {
/** 撤回成功*/
function
withdrawButton
()
{
createMessage
.
success
(
'撤回成功!'
)
}
/** 查看*/
function
detailButton
(
record
)
{
console
.
log
(
'record:'
,
record
)
emit
(
'success'
,
{
values
:
{
...
record
}});
closeModal
();
}
...
...
src/views/dataStandards/basicStandards/basicStandardsData.ts
View file @
7990f5f2
...
...
@@ -642,16 +642,63 @@ export const treeDataListTwo = [
},
]
/**编辑页 选择字典树 数据*/
export
const
chooseDictoryTreeData
=
[
{
label
:
'默认工作组'
,
businessId
:
1
,
children
:
[
{
label
:
'默认工作组01'
,
businessId
:
2
},
{
label
:
'默认工作组02'
,
businessId
:
3
},
{
label
:
'默认工作组03'
,
businessId
:
4
},
{
label
:
'默认工作组04'
,
businessId
:
5
},
],
"delFlag"
:
"0"
,
"flag"
:
"1"
,
"businessId"
:
100
,
"basicStandardName"
:
"所有命名字典"
,
"anotherName"
:
"所有命名字典"
,
"parentId"
:
0
,
"ancestors"
:
"0"
,
"orderNum"
:
0
,
"children"
:
[
],
icon
:
'ion:settings-outline'
,
},
{
"delFlag"
:
"0"
,
"flag"
:
"1"
,
"businessId"
:
101
,
"basicStandardName"
:
"共享工作区"
,
"anotherName"
:
"共享工作区"
,
"parentId"
:
100
,
"ancestors"
:
"0,100"
,
"children"
:
[
],
icon
:
'ion:settings-outline'
,
},
{
"delFlag"
:
"0"
,
"flag"
:
"1"
,
"businessId"
:
102
,
"basicStandardName"
:
"关联域"
,
"anotherName"
:
"关联域"
,
"parentId"
:
101
,
"ancestors"
:
"0,100,101"
,
"children"
:
[
],
icon
:
'ion:settings-outline'
,
},
{
"delFlag"
:
"0"
,
"flag"
:
"1"
,
"businessId"
:
103
,
"basicStandardName"
:
"日期"
,
"anotherName"
:
"日期"
,
"parentId"
:
102
,
"ancestors"
:
"0,100,101,102"
,
"children"
:
[
],
icon
:
'ion:settings-outline'
,
},
{
"delFlag"
:
"0"
,
"flag"
:
"1"
,
"businessId"
:
104
,
"basicStandardName"
:
"创建日期"
,
"anotherName"
:
"创建日期"
,
"parentId"
:
102
,
"ancestors"
:
"0,100,101,102"
,
"children"
:
[
],
icon
:
'ion:settings-outline'
,
},
]
src/views/dataStandards/basicStandards/editDetailStandard.vue
View file @
7990f5f2
<
template
>
<PageWrapper
title=
"基础标准编辑页"
contentBackground
>
<div
style=
"background-color: white"
>
<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"
>
{{
title
}}
...
...
@@ -23,7 +24,7 @@
<!-- 选择命名字典 弹窗-->
<ChooseNamingDictionaryModal
@
register=
"registerChooseNamingDictionaryModal"
@
success=
"handleSuccess"
/>
</
PageWrapper
>
</
div
>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
Description
}
from
'@/components/Description'
;
...
...
@@ -41,11 +42,13 @@ import {onMounted, ref} from "vue";
import
{
useRoute
}
from
"vue-router"
;
import
ChooseNamingDictionaryModal
from
'./ChooseNamingDictionaryModal.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
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerChooseNamingDictionaryModal
,
{
openModal
:
openChooseNamingDictonaryModal
}]
=
useModal
();
const
[
registerForm1
,
{
setFieldsValue
:
setFieldsValue1
}]
=
useForm
({
labelWidth
:
100
,
...
...
@@ -87,9 +90,17 @@ function exitEditButton(record) {
/**保存*/
function
saveButton
(
record
)
{
createMessage
.
success
(
'保存成功'
)
router
.
push
({
path
:
'/dataStandards/basicStandards/detailStandard'
,
query
:
{
businessId
:
businessId
.
value
,
},
});
}
/**发布*/
function
publishButton
(
record
)
{
...
...
src/views/dataStandards/basicStandards/index.vue
View file @
7990f5f2
...
...
@@ -90,7 +90,6 @@
import
{
useRoute
}
from
'vue-router'
;
import
{
TreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
router
}
from
'@/router'
;
import
{
demoListApi
}
from
'@/api/demo/table'
;
import
{
exportUserList
}
from
"@/api/system/user/user"
;
import
{
downloadByData
}
from
"@/utils/file/download"
;
...
...
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