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