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
7287d5a8
Commit
7287d5a8
authored
Nov 13, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础标准页面
parent
8a760e0e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
112 additions
and
110 deletions
+112
-110
BasicStandardsTree.vue
...views/dataStandards/basicStandards/BasicStandardsTree.vue
+70
-63
ContrastModal.vue
src/views/dataStandards/basicStandards/ContrastModal.vue
+0
-0
basicStandards.data.ts
...views/dataStandards/basicStandards/basicStandards.data.ts
+24
-35
createBasicStandards.vue
...ews/dataStandards/basicStandards/createBasicStandards.vue
+9
-10
createStandardsType.vue
...iews/dataStandards/basicStandards/createStandardsType.vue
+9
-2
No files found.
src/views/dataStandards/basicStandards/BasicStandardsTree.vue
View file @
7287d5a8
...
@@ -15,15 +15,18 @@
...
@@ -15,15 +15,18 @@
:actionList="actionList"
:actionList="actionList"
/>
/>
</div>
</div>
<MoveFile
@
register=
"registerMoveFile"
@
success=
"handleSuccess"
/>
<!-- 移动 弹窗-->
<ResetName
@
register=
"registerResetNameModal"
@
success=
"handleSuccess"
/>
<MoveModal
@
register=
"registerMoveModal"
@
success=
"handleSuccess"
/>
<CreateFile
@
register=
"registerCreateFileModal"
@
success=
"handleSuccess"
/>
<!-- 复制到 弹窗-->
<CreateTask
@
register=
"registerCreateTaskModal"
@
success=
"handleSuccess"
/>
<CopyModal
@
register=
"registerCopyModal"
@
success=
"handleSuccess"
/>
<!-- 新建基础标准 弹窗-->
<CreateBasicStandards
@
register=
"registerCreateBasicStandardsModal"
@
success=
"handleSuccess"
/>
<!-- 新建标准分类 弹窗-->
<CreateStandardsType
@
register=
"registerCreateStandardsTypeModal"
@
success=
"handleSuccess"
/>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
h
,
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
h
,
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicTree
,
ContextMenuItem
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
BasicTree
,
ContextMenuItem
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
getDeptList
}
from
'@/api/system/dept/dept'
;
import
{
Nullable
}
from
"@vben/types"
;
import
{
Nullable
}
from
"@vben/types"
;
import
{
TreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
TreeData
}
from
"@/views/dataStandards/basicStandards/basicStandardsData"
;
import
{
EventDataNode
}
from
"ant-design-vue/es/vc-tree/interface"
;
import
{
EventDataNode
}
from
"ant-design-vue/es/vc-tree/interface"
;
...
@@ -31,22 +34,21 @@ import {PlusOutlined,EllipsisOutlined} from "@ant-design/icons-vue";
...
@@ -31,22 +34,21 @@ import {PlusOutlined,EllipsisOutlined} from "@ant-design/icons-vue";
import
{
useMessage
}
from
"@/hooks/web/useMessage"
;
import
{
useMessage
}
from
"@/hooks/web/useMessage"
;
import
{
Modal
}
from
"ant-design-vue"
;
import
{
Modal
}
from
"ant-design-vue"
;
import
{
useModal
}
from
"@/components/Modal"
;
import
{
useModal
}
from
"@/components/Modal"
;
import
MoveFile
from
'./moveFile.vue'
;
import
ResetName
from
'./MoveModal.vue'
;
import
{
router
}
from
"@/router"
;
import
{
router
}
from
"@/router"
;
import
CreateTask
from
'./createBasicStandards.vue'
;
import
CreateBasicStandards
from
'./createBasicStandards.vue'
;
import
CreateFile
from
'./createStandardsType.vue'
;
import
CreateStandardsType
from
'./createStandardsType.vue'
;
import
MoveModal
from
'./MoveModal.vue'
;
import
CopyModal
from
'./CopyModal.vue'
;
defineOptions
({
name
:
'DeptTree'
});
defineOptions
({
name
:
'DeptTree'
});
const
{
createMessage
}
=
useMessage
();
const
emit
=
defineEmits
([
'select'
]);
const
emit
=
defineEmits
([
'select'
]);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
const
[
registerMoveFile
,
{
openModal
:
openMoveFileModal
}]
=
useModal
();
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerResetNameModal
,
{
openModal
:
openResetNameModal
}]
=
useModal
();
const
[
registerMoveModal
,
{
openModal
:
openMoveModal
}]
=
useModal
();
const
[
registerCreateTaskModal
,
{
openModal
:
openCreateTaskModal
}]
=
useModal
();
const
[
registerCopyModal
,
{
openModal
:
openCopyModal
}]
=
useModal
();
const
[
registerCreateFileModal
,
{
openModal
:
openCreateFileModal
}]
=
useModal
();
const
[
registerCreateBasicStandardsModal
,
{
openModal
:
openCreateBasicStandardsModal
}]
=
useModal
();
const
[
registerCreateStandardsTypeModal
,
{
openModal
:
openCreateStandardsTypeModal
}]
=
useModal
();
function
getTree
()
{
function
getTree
()
{
const
tree
=
unref
(
treeRef
);
const
tree
=
unref
(
treeRef
);
if
(
!
tree
)
{
if
(
!
tree
)
{
...
@@ -63,6 +65,7 @@ async function fetch() {
...
@@ -63,6 +65,7 @@ async function fetch() {
})
})
}
}
/** 转成树 */
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
id
=
id
||
'id'
parentId
=
parentId
||
'parentId'
parentId
=
parentId
||
'parentId'
...
@@ -83,6 +86,7 @@ function handleTree(data, id, parentId, children, rootId) {
...
@@ -83,6 +86,7 @@ function handleTree(data, id, parentId, children, rootId) {
return
treeData
!==
''
?
treeData
:
data
return
treeData
!==
''
?
treeData
:
data
}
}
/**选中的数据*/
function
handleSelect
(
keys
)
{
function
handleSelect
(
keys
)
{
emit
(
'select'
,
keys
[
0
]);
emit
(
'select'
,
keys
[
0
]);
}
}
...
@@ -112,14 +116,14 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> {
...
@@ -112,14 +116,14 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> {
{
{
label
:
'查看详情'
,
label
:
'查看详情'
,
handler
:
()
=>
{
handler
:
()
=>
{
handleD
etailButton
(
node
)
d
etailButton
(
node
)
},
},
icon
:
'ant-design:
eye
-outlined'
,
icon
:
'ant-design:
file-search
-outlined'
,
},
},
{
{
label
:
'编辑'
,
label
:
'编辑'
,
handler
:
()
=>
{
handler
:
()
=>
{
handleUpdate
Button
(
node
)
edit
Button
(
node
)
},
},
icon
:
'ant-design:edit-outlined'
,
icon
:
'ant-design:edit-outlined'
,
},
},
...
@@ -128,26 +132,26 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> {
...
@@ -128,26 +132,26 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> {
handler
:
()
=>
{
handler
:
()
=>
{
standardsTypeButton
(
node
)
standardsTypeButton
(
node
)
},
},
icon
:
'
bi:plus
'
,
icon
:
'
ant-design:file-text-twotone
'
,
},
},
{
{
label
:
'新建标准分类'
,
label
:
'新建标准分类'
,
handler
:
()
=>
{
handler
:
()
=>
{
createStandardsTypeButton
(
node
)
createStandardsTypeButton
(
node
)
},
},
icon
:
'
bi:plus
'
,
icon
:
'
ant-design:file-add-outlined
'
,
},
},
{
{
label
:
'新建基础标准'
,
label
:
'新建基础标准'
,
handler
:
()
=>
{
handler
:
()
=>
{
createBasicStandardsButton
(
node
)
createBasicStandardsButton
(
node
)
},
},
icon
:
'ant-design:
snippets
-outlined'
,
icon
:
'ant-design:
file-add
-outlined'
,
},
},
{
{
label
:
'复制到'
,
label
:
'复制到'
,
handler
:
()
=>
{
handler
:
()
=>
{
copyButton
(
node
)
copyButton
()
},
},
icon
:
'ant-design:snippets-twotone'
,
icon
:
'ant-design:snippets-twotone'
,
},
},
...
@@ -161,9 +165,9 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> {
...
@@ -161,9 +165,9 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> {
{
{
label
:
'移动'
,
label
:
'移动'
,
handler
:
()
=>
{
handler
:
()
=>
{
handleMove
(
node
)
MoveButton
(
)
},
},
icon
:
'
bx:bxs-folder-open
'
,
icon
:
'
ant-design:folder-open-outlined
'
,
},
},
];
];
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
...
@@ -171,57 +175,68 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> {
...
@@ -171,57 +175,68 @@ function getRightMenuList(node: EventDataNode): Promise<ContextMenuItem[]> {
});
});
}
}
/**查看详情*/
function
detailButton
(
record
)
{
router
.
push
({
path
:
'/dataStandards/basicStandards/detailStandard'
,
query
:
{
businessId
:
record
.
businessId
,
},
});
}
/**移动*/
function
MoveButton
()
{
openMoveModal
(
true
,
{
/**复制 按钮*/
});
function
copyButton
(
record
:
Recordable
)
{
createMessage
.
success
(
'复制成功!'
);
}
}
/**查看详情 按钮*/
/**新建标准分类*/
function
handleDetailButton
(
record
:
Recordable
)
{
function
createStandardsTypeButton
(
record
)
{
createMessage
.
success
(
'复制成功!'
);
openCreateStandardsTypeModal
(
true
,
{
record
});
}
/**新建基础标准*/
function
createBasicStandardsButton
(
record
)
{
openCreateBasicStandardsModal
(
true
,
{
record
});
}
}
/**新建标准分类 按钮*/
/**复制到 按钮*/
function
createStandardsTypeButton
(
record
:
Recordable
)
{
function
copyButton
()
{
createMessage
.
success
(
'新建成功!'
);
openCopyModal
(
true
,
{
});
}
}
/**删除 按钮*/
/**删除 按钮*/
function
deleteButton
(
record
:
Recordable
)
{
function
deleteButton
(
record
:
Recordable
)
{
Modal
.
confirm
({
createConfirm
({
iconType
:
'warning'
,
title
:
'确认删除'
,
title
:
'确认删除'
,
content
:
'确定要删除此节点吗?'
,
content
:
'确认批量删除选中数据吗?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onOk
()
{
onOk
()
{
// 执行删除逻辑
createMessage
.
success
(
'删除成功!'
);
createMessage
.
success
(
'删除成功!'
)
},
onCancel
()
{
console
.
log
(
'取消删除'
);
createMessage
.
info
(
'取消删除'
)
},
},
});
});
}
}
/** 修改 按钮*/
/** 修改 按钮*/
function
handleUpdateButton
(
record
:
Recordable
)
{
function
handleUpdateButton
(
record
:
Recordable
)
{
createMessage
.
success
(
'修改成功!'
);
}
/** 移动 按钮*/
function
handleMove
(
record
:
Recordable
)
{
openMoveFileModal
(
true
,
{
record
,
isMove
:
true
,
});
}
}
/**新建文件夹*/
/**编辑标准*/
function
createFileButton
(
record
:
Recordable
)
{
function
editButton
(
record
)
{
openCreateFileModal
(
true
,
{
router
.
push
({
isAdd
:
true
,
path
:
'/dataStandards/basicStandards/editDetailStandard'
,
query
:
{
businessId
:
record
.
businessId
,
},
});
});
}
}
...
@@ -229,14 +244,6 @@ function createFileButton(record: Recordable) {
...
@@ -229,14 +244,6 @@ function createFileButton(record: Recordable) {
function
standardsTypeButton
(
record
:
Recordable
)
{
function
standardsTypeButton
(
record
:
Recordable
)
{
createMessage
.
success
(
'标准分类信息'
)
createMessage
.
success
(
'标准分类信息'
)
}
}
/**新建基础标准*/
function
createBasicStandardsButton
(
record
:
Recordable
)
{
openCreateTaskModal
(
true
,
{
isAdd
:
true
,
});
}
/** 成功回调*/
/** 成功回调*/
function
handleSuccess
()
{
function
handleSuccess
()
{
...
...
src/views/dataStandards/basicStandards/
c
ontrastModal.vue
→
src/views/dataStandards/basicStandards/
C
ontrastModal.vue
View file @
7287d5a8
File moved
src/views/dataStandards/basicStandards/basicStandards.data.ts
View file @
7287d5a8
...
@@ -248,6 +248,7 @@ export const createBasicTypeFormSchema: FormSchema[] = [
...
@@ -248,6 +248,7 @@ export const createBasicTypeFormSchema: FormSchema[] = [
field
:
'permissionMode'
,
field
:
'permissionMode'
,
label
:
'权限模式'
,
label
:
'权限模式'
,
component
:
'RadioGroup'
,
component
:
'RadioGroup'
,
defaultValue
:
'1'
,
componentProps
:
{
componentProps
:
{
options
:
[
options
:
[
{
label
:
'本级定义'
,
value
:
'1'
},
{
label
:
'本级定义'
,
value
:
'1'
},
...
@@ -321,67 +322,55 @@ export const createBasicStandardsFormSchema: FormSchema[] = [
...
@@ -321,67 +322,55 @@ export const createBasicStandardsFormSchema: FormSchema[] = [
{
{
field
:
'standardsTypeName'
,
field
:
'standardsTypeName'
,
label
:
'标准类型'
,
label
:
'标准类型'
,
component
:
'
Selec
t'
,
component
:
'
Inpu
t'
,
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
defaultValue
:
'基础标准'
,
componentProps
:
{
componentProps
:
{
options
:[
style
:
{
{
border
:
'none'
,
label
:
'基础标准'
,
backgroundColor
:
'transparent'
,
value
:
'1'
,
},
},
readonly
:
true
,
]
},
},
rules
:
[
rules
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'请
选择目录权属模式
'
,
message
:
'请
输入标准类型
'
,
},
},
],
],
},
},
{
{
field
:
'permissionMode'
,
field
:
'permissionMode'
,
label
:
'目录权属模式'
,
label
:
'目录权属模式'
,
component
:
'
Selec
t'
,
component
:
'
Inpu
t'
,
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
defaultValue
:
'本级定义'
,
componentProps
:
{
componentProps
:
{
options
:[
style
:
{
{
border
:
'none'
,
label
:
'本级定义'
,
backgroundColor
:
'transparent'
,
value
:
'1'
,
},
},
readonly
:
true
,
{
label
:
'资源自定义'
,
value
:
'2'
,
},
]
},
},
rules
:
[
rules
:
[
{
{
required
:
true
,
required
:
true
,
message
:
'请
选择
目录权属模式'
,
message
:
'请
输入
目录权属模式'
,
},
},
],
],
},
},
{
{
field
:
'username'
,
field
:
'username'
,
label
:
'权属工作组'
,
label
:
'权属工作组'
,
component
:
'
Selec
t'
,
component
:
'
Inpu
t'
,
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
defaultValue
:
'-'
,
componentProps
:
{
componentProps
:
{
options
:[
style
:
{
{
border
:
'none'
,
label
:
'默认工作组'
,
backgroundColor
:
'transparent'
,
value
:
'1'
,
},
},
readonly
:
true
,
{
label
:
'个人工作组'
,
value
:
'2'
,
},
{
label
:
'共享工作组'
,
value
:
'3'
,
},
]
},
},
rules
:
[
rules
:
[
{
{
...
...
src/views/dataStandards/basicStandards/createBasicStandards.vue
View file @
7287d5a8
...
@@ -3,14 +3,6 @@
...
@@ -3,14 +3,6 @@
<BasicForm
@
register=
"registerForm"
/>
<BasicForm
@
register=
"registerForm"
/>
<div
class=
"modalRow"
>
<div
class=
"modalRow"
>
<div>
可见范围
</div>
<div>
可见范围
</div>
<div
class=
"right"
>
<div
class=
"clearAll"
>
清空
</div>
<div>
<a-button
type=
"primary"
>
添加工作组
</a-button>
</div>
</div>
</div>
</div>
<div
class=
"addDialogBG"
>
<div
class=
"addDialogBG"
>
<div
style=
"float: right"
>
<div
style=
"float: right"
>
...
@@ -53,8 +45,15 @@
...
@@ -53,8 +45,15 @@
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
const
formData
=
{
var
formData
=
{}
taskId
:
'100'
if
(
data
.
record
===
null
||
data
.
record
===
undefined
){
formData
=
{
standardsTree
:
'100'
}
}
else
{
formData
=
{
standardsTree
:
data
.
record
.
businessId
}
}
}
// 塞值
// 塞值
setFieldsValue
({
setFieldsValue
({
...
...
src/views/dataStandards/basicStandards/createStandardsType.vue
View file @
7287d5a8
...
@@ -52,8 +52,15 @@
...
@@ -52,8 +52,15 @@
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
const
formData
=
{
var
formData
=
{}
taskId
:
'100'
if
(
data
.
record
===
null
||
data
.
record
===
undefined
){
formData
=
{
standardsTree
:
'100'
}
}
else
{
formData
=
{
standardsTree
:
data
.
record
.
businessId
}
}
}
// 塞值
// 塞值
setFieldsValue
({
setFieldsValue
({
...
...
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