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
b7f5f4d3
Commit
b7f5f4d3
authored
Nov 12, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础标准页面
parent
1a7875f7
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 @
b7f5f4d3
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
:checkable=
"true"
:checkable=
"true"
:defaultExpandAll=
"true"
:defaultExpandAll=
"true"
:treeData=
"treeData"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: '
label
' }"
:fieldNames=
"
{ key: 'businessId', title: '
basicStandardName
' }"
@select="handleSelect"
@select="handleSelect"
/>
/>
</div>
</div>
...
@@ -28,7 +28,7 @@ import {nextTick, onMounted, ref, unref} from 'vue';
...
@@ -28,7 +28,7 @@ import {nextTick, onMounted, ref, unref} from 'vue';
async
function
fetch
()
{
async
function
fetch
()
{
treeData
.
value
=
chooseDictoryTreeData
treeData
.
value
=
handleTree
(
chooseDictoryTreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
)
await
nextTick
(()
=>
{
await
nextTick
(()
=>
{
getTree
().
expandAll
(
true
)
getTree
().
expandAll
(
true
)
})
})
...
@@ -49,6 +49,26 @@ function getTree() {
...
@@ -49,6 +49,26 @@ function getTree() {
onMounted
(()
=>
{
onMounted
(()
=>
{
fetch
();
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
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.bg-white
{
.bg-white
{
...
...
src/views/dataStandards/basicStandards/VersionModal.vue
View file @
b7f5f4d3
...
@@ -109,12 +109,11 @@ function contrastButton() {
...
@@ -109,12 +109,11 @@ function contrastButton() {
/** 撤回成功*/
/** 撤回成功*/
function
withdrawButton
()
{
function
withdrawButton
()
{
createMessage
.
success
(
'撤回成功!'
)
}
}
/** 查看*/
/** 查看*/
function
detailButton
(
record
)
{
function
detailButton
(
record
)
{
console
.
log
(
'record:'
,
record
)
emit
(
'success'
,
{
values
:
{
...
record
}});
emit
(
'success'
,
{
values
:
{
...
record
}});
closeModal
();
closeModal
();
}
}
...
...
src/views/dataStandards/basicStandards/basicStandardsData.ts
View file @
b7f5f4d3
...
@@ -642,16 +642,63 @@ export const treeDataListTwo = [
...
@@ -642,16 +642,63 @@ export const treeDataListTwo = [
},
},
]
]
/**编辑页 选择字典树 数据*/
/**编辑页 选择字典树 数据*/
export
const
chooseDictoryTreeData
=
[
export
const
chooseDictoryTreeData
=
[
{
{
label
:
'默认工作组'
,
"delFlag"
:
"0"
,
businessId
:
1
,
"flag"
:
"1"
,
children
:
[
"businessId"
:
100
,
{
label
:
'默认工作组01'
,
businessId
:
2
},
"basicStandardName"
:
"所有命名字典"
,
{
label
:
'默认工作组02'
,
businessId
:
3
},
"anotherName"
:
"所有命名字典"
,
{
label
:
'默认工作组03'
,
businessId
:
4
},
"parentId"
:
0
,
{
label
:
'默认工作组04'
,
businessId
:
5
},
"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 @
b7f5f4d3
<
template
>
<
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=
"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"
>
<div
style=
"margin-top: 10px;display: flex;font-weight: bold;font-size: 25px"
>
{{
title
}}
{{
title
}}
...
@@ -23,7 +24,7 @@
...
@@ -23,7 +24,7 @@
<!-- 选择命名字典 弹窗-->
<!-- 选择命名字典 弹窗-->
<ChooseNamingDictionaryModal
@
register=
"registerChooseNamingDictionaryModal"
@
success=
"handleSuccess"
/>
<ChooseNamingDictionaryModal
@
register=
"registerChooseNamingDictionaryModal"
@
success=
"handleSuccess"
/>
</
PageWrapper
>
</
div
>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
Description
}
from
'@/components/Description'
;
import
{
Description
}
from
'@/components/Description'
;
...
@@ -41,11 +42,13 @@ import {onMounted, ref} from "vue";
...
@@ -41,11 +42,13 @@ import {onMounted, ref} from "vue";
import
{
useRoute
}
from
"vue-router"
;
import
{
useRoute
}
from
"vue-router"
;
import
ChooseNamingDictionaryModal
from
'./ChooseNamingDictionaryModal.vue'
import
ChooseNamingDictionaryModal
from
'./ChooseNamingDictionaryModal.vue'
import
{
useModal
}
from
"@/components/Modal"
;
import
{
useModal
}
from
"@/components/Modal"
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
const
route
=
useRoute
()
const
route
=
useRoute
()
const
title
=
ref
(
''
)
const
title
=
ref
(
''
)
const
formData
=
ref
({})
const
formData
=
ref
({})
const
businessId
=
ref
(
''
)
const
businessId
=
ref
(
''
)
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerChooseNamingDictionaryModal
,
{
openModal
:
openChooseNamingDictonaryModal
}]
=
useModal
();
const
[
registerChooseNamingDictionaryModal
,
{
openModal
:
openChooseNamingDictonaryModal
}]
=
useModal
();
const
[
registerForm1
,
{
setFieldsValue
:
setFieldsValue1
}]
=
useForm
({
const
[
registerForm1
,
{
setFieldsValue
:
setFieldsValue1
}]
=
useForm
({
labelWidth
:
100
,
labelWidth
:
100
,
...
@@ -87,9 +90,17 @@ function exitEditButton(record) {
...
@@ -87,9 +90,17 @@ function exitEditButton(record) {
/**保存*/
/**保存*/
function
saveButton
(
record
)
{
function
saveButton
(
record
)
{
createMessage
.
success
(
'保存成功'
)
router
.
push
({
path
:
'/dataStandards/basicStandards/detailStandard'
,
query
:
{
businessId
:
businessId
.
value
,
},
});
}
}
/**发布*/
/**发布*/
function
publishButton
(
record
)
{
function
publishButton
(
record
)
{
...
...
src/views/dataStandards/basicStandards/index.vue
View file @
b7f5f4d3
...
@@ -90,7 +90,6 @@
...
@@ -90,7 +90,6 @@
import
{
useRoute
}
from
'vue-router'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
TreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
TreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
router
}
from
'@/router'
;
import
{
router
}
from
'@/router'
;
import
{
demoListApi
}
from
'@/api/demo/table'
;
import
{
exportUserList
}
from
"@/api/system/user/user"
;
import
{
exportUserList
}
from
"@/api/system/user/user"
;
import
{
downloadByData
}
from
"@/utils/file/download"
;
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