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
00b816a0
Commit
00b816a0
authored
Dec 05, 2024
by
baiyinhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改shell开发
parent
00060f56
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
523 additions
and
12 deletions
+523
-12
importModal.vue
...tDevelopment/shellDevelopment/importModal/importModal.vue
+40
-4
mock.ts
...ws/scriptDevelopment/shellDevelopment/importModal/mock.ts
+243
-0
tempalte.data.ts
...Development/shellDevelopment/importModal/tempalte.data.ts
+16
-1
index.vue
src/views/scriptDevelopment/shellDevelopment/index.vue
+18
-3
mainBody.data.ts
...views/scriptDevelopment/shellDevelopment/mainBody.data.ts
+155
-0
renameModal.vue
src/views/scriptDevelopment/shellDevelopment/renameModal.vue
+48
-0
versionManagementModal.vue
.../shellDevelopment/shellExecute/versionManagementModal.vue
+3
-4
No files found.
src/views/scriptDevelopment/shellDevelopment/importModal/importModal.vue
View file @
00b816a0
...
...
@@ -26,7 +26,8 @@
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
importFormSchema
}
from
'./tempalte.data'
;
import
{
onMountedOrActivated
}
from
"@vben/hooks"
;
import
{
TreeData
}
from
'./mock'
;
import
{
onMountedOrActivated
}
from
'@vben/hooks'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
isUpdate
=
ref
(
true
);
...
...
@@ -49,6 +50,16 @@
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
isMove
.
value
=
!!
data
?.
isMove
;
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
);
updateSchema
([
{
field
:
'taskId'
,
componentProps
:
{
treeData
:
treeList
,
},
},
]);
console
.
log
(
'treeList:'
,
treeList
);
if
(
unref
(
isUpdate
))
{
// 获取行数据的id
rowId
.
value
=
data
.
record
.
businessId
;
...
...
@@ -59,9 +70,6 @@
}
});
// onMounted(){}
// const getTitle = computed(() => '新建文件');
const
getTitle
=
'导入文件选择'
;
...
...
@@ -69,4 +77,32 @@
async
function
handleSubmit
()
{
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
;
// 对源数据深度克隆
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
>
src/views/scriptDevelopment/shellDevelopment/importModal/mock.ts
0 → 100644
View file @
00b816a0
export
const
tableList
:
any
[]
=
[
{
businessId
:
1
,
name
:
'值域检查(倍数)'
,
dataSource
:
[
{
icon
:
'🧩'
,
text
:
'INCEPTOR'
},
{
icon
:
'🧩'
,
text
:
'MYSQL'
},
{
icon
:
'🧩'
,
text
:
'GBASE'
},
],
templateNumber
:
'BIDQ000038'
,
createTime
:
'2023/05/23 14:36:04'
,
updateTime
:
'2023/05/23 14:36:04'
,
owner
:
'admin'
,
workgroup
:
'默认工作组'
,
},
{
businessId
:
2
,
name
:
'值域检查(数值大于零)'
,
dataSource
:
[
{
icon
:
'🧩'
,
text
:
'INCEPTOR'
},
{
icon
:
'🧩'
,
text
:
'GBASE'
},
],
templateNumber
:
'BIDQ000041'
,
createTime
:
'2023/05/23 14:36:04'
,
updateTime
:
'2023/05/23 14:36:05'
,
owner
:
'admin'
,
workgroup
:
'默认工作组'
,
description
:
'这是模板描述'
,
category
:
'规范性'
,
sql
:
'SELECT COUNT(*)
\
n'
+
'FROM $(table a}
\
n'
+
'WHERE ${column a}IS NOT NULL AND ${column a}NOT IN (${range a})'
,
params
:
[
{
key
:
'1'
,
parameter
:
'table_a'
,
type
:
'数据表类'
,
description
:
'数据表'
,
value
:
'默认工作组/数据库a/数据表a'
,
},
{
key
:
'2'
,
parameter
:
'column_a'
,
type
:
'数据字段类'
,
description
:
'数据字段'
,
value
:
'默认工作组/数据库a/数据表a/字段a'
,
},
{
key
:
'3'
,
parameter
:
'range_a'
,
type
:
'公共代码类'
,
description
:
'值域'
,
value
:
'公共代码/数据范围a'
,
},
],
},
{
businessId
:
3
,
name
:
'值域检查(比率)'
,
dataSource
:
[
{
icon
:
'🧩'
,
text
:
'MYSQL'
},
{
icon
:
'🧩'
,
text
:
'GBASE'
},
],
templateNumber
:
'BIDQ000039'
,
createTime
:
'2023/05/23 14:36:04'
,
updateTime
:
'2023/05/23 14:36:04'
,
owner
:
'admin'
,
workgroup
:
'默认工作组'
,
},
{
businessId
:
4
,
name
:
'值域检查(负数率)'
,
dataSource
:
[
{
icon
:
'🧩'
,
text
:
'INCEPTOR'
},
{
icon
:
'🧩'
,
text
:
'MYSQL'
},
],
templateNumber
:
'BIDQ000040'
,
createTime
:
'2023/05/23 14:36:04'
,
updateTime
:
'2023/05/23 14:36:05'
,
owner
:
'admin'
,
workgroup
:
'默认工作组'
,
},
{
businessId
:
5
,
name
:
'值域检查(额度)'
,
dataSource
:
[
{
icon
:
'🧩'
,
text
:
'INCEPTOR'
},
{
icon
:
'🧩'
,
text
:
'MYSQL'
},
],
templateNumber
:
'BIDQ000043'
,
createTime
:
'2023/05/23 14:36:04'
,
updateTime
:
'2023/05/23 14:36:05'
,
owner
:
'admin'
,
workgroup
:
'默认工作组'
,
},
{
businessId
:
6
,
name
:
'关键字检查(非空)'
,
dataSource
:
[
{
icon
:
'🧩'
,
text
:
'INCEPTOR'
},
{
icon
:
'🧩'
,
text
:
'MYSQL'
},
],
templateNumber
:
'BIDQ000033'
,
createTime
:
'2023/05/23 14:36:04'
,
updateTime
:
'2023/05/23 14:36:04'
,
owner
:
'admin'
,
workgroup
:
'默认工作组'
,
},
{
businessId
:
7
,
name
:
'编码规则检查(检查证件有效)'
,
dataSource
:
[
{
icon
:
'🧩'
,
text
:
'INCEPTOR'
},
{
icon
:
'🧩'
,
text
:
'GBASE'
},
],
templateNumber
:
'BIDQ000042'
,
createTime
:
'2023/05/23 14:36:04'
,
updateTime
:
'2023/05/23 14:36:05'
,
owner
:
'admin'
,
workgroup
:
'默认工作组'
,
},
{
businessId
:
8
,
name
:
'长度检查[0,30]'
,
dataSource
:
[
{
icon
:
'🧩'
,
text
:
'MYSQL'
},
{
icon
:
'🧩'
,
text
:
'GBASE'
},
],
templateNumber
:
'BIDQ000035'
,
createTime
:
'2023/05/23 14:36:04'
,
updateTime
:
'2023/05/23 14:36:04'
,
owner
:
'admin'
,
workgroup
:
'默认工作组'
,
},
{
businessId
:
9
,
name
:
'长度检查[0,4]'
,
dataSource
:
[
{
icon
:
'🧩'
,
text
:
'MYSQL'
},
{
icon
:
'🧩'
,
text
:
'GBASE'
},
],
templateNumber
:
'BIDQ000034'
,
createTime
:
'2023/05/23 14:36:04'
,
updateTime
:
'2023/05/23 14:36:04'
,
owner
:
'admin'
,
workgroup
:
'默认工作组'
,
},
{
businessId
:
10
,
name
:
'长度检查[0,8]'
,
dataSource
:
[
{
icon
:
'🧩'
,
text
:
'GBASE'
},
{
icon
:
'🧩'
,
text
:
'MYSQL'
},
],
templateNumber
:
'BIDQ000036'
,
createTime
:
'2023/05/23 14:36:04'
,
updateTime
:
'2023/05/23 14:36:04'
,
owner
:
'admin'
,
workgroup
:
'默认工作组'
,
},
];
export
const
treeDataList
=
[
{
title
:
'主体管理'
,
key
:
1
,
icon
:
'home|svg'
,
children
:
[
{
title
:
'admin_个人工作区'
,
key
:
2
},
{
title
:
'共享工作区'
,
key
:
3
},
{
title
:
'商城工作区'
,
key
:
4
},
{
title
:
'指标工作区'
,
key
:
5
},
],
},
];
export
const
treeDataListTwo
=
[
{
label
:
'默认工作组'
,
businessId
:
1
,
children
:
[
{
label
:
'默认工作组01'
,
businessId
:
2
},
{
label
:
'默认工作组02'
,
businessId
:
3
},
{
label
:
'默认工作组03'
,
businessId
:
4
},
{
label
:
'默认工作组04'
,
businessId
:
5
},
],
},
];
export
const
TreeData
:
any
[]
=
[
{
businessId
:
100
,
QualityName
:
'质量模版'
,
anotherName
:
'质量模版'
,
parentId
:
0
,
location
:
'/质量模版'
,
icon
:
'ant-design:folder-open-outlined'
,
},
{
businessId
:
101
,
QualityName
:
'CEA_POC_模版'
,
anotherName
:
'CEA_POC_模版'
,
parentId
:
100
,
ancestors
:
'0,100'
,
icon
:
'ant-design:folder-open-outlined'
,
},
{
businessId
:
102
,
QualityName
:
'数据中台工作区01'
,
anotherName
:
'数据中台工作区01'
,
parentId
:
100
,
ancestors
:
'0,100'
,
location
:
'/质量模版/数据中台工作区01'
,
icon
:
'ant-design:folder-open-outlined'
,
},
{
businessId
:
201
,
QualityName
:
'值域检查(倍数)'
,
anotherName
:
'值域检查(倍数)'
,
parentId
:
102
,
ancestors
:
'0,100,102'
,
location
:
'/质量模版/数据中台工作区01/值域检查(倍数)'
,
icon
:
'ant-design:partition-outlined'
,
},
{
businessId
:
202
,
QualityName
:
'值域检查(数值大于零)'
,
anotherName
:
'值域检查(数值大于零)'
,
parentId
:
102
,
ancestors
:
'0,100,102'
,
location
:
'/质量模版/数据中台工作区01/值域检查(数值大于零)'
,
icon
:
'ant-design:partition-outlined'
,
},
{
businessId
:
204
,
QualityName
:
'准取检查-数值大于等于n'
,
anotherName
:
'准取检查-数值大于等于n'
,
parentId
:
101
,
ancestors
:
'0,100,101'
,
location
:
'/质量模版/CEA_POC_模版/准取检查-数值大于等于n'
,
icon
:
'ant-design:partition-outlined'
,
},
];
src/views/scriptDevelopment/shellDevelopment/importModal/tempalte.data.ts
View file @
00b816a0
...
...
@@ -213,6 +213,21 @@ export const formSchemaTemplate: any = [
},
];
export
const
importFormSchema
:
any
[]
=
[
{
field
:
'taskId'
,
label
:
'导入至'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
// border: 'none',
fieldNames
:
{
label
:
'QualityName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
required
:
true
,
},
{
field
:
'fileMethods'
,
label
:
'导入文件选择'
,
...
...
@@ -221,7 +236,7 @@ export const importFormSchema: any[] = [
},
{
field
:
'fileRename'
,
label
:
'文件重名'
,
label
:
'
shell
文件重名'
,
component
:
'RadioGroup'
,
required
:
true
,
colProps
:
{
lg
:
24
,
md
:
24
,
offset
:
3
},
...
...
src/views/scriptDevelopment/shellDevelopment/index.vue
View file @
00b816a0
...
...
@@ -7,19 +7,19 @@
<BasicTable
@
register=
"registerTable"
class=
"w-3/4 xl:w-4/5"
:searchInfo=
"searchInfo"
>
<template
#
toolbar
>
<Tooltip
title=
"复制"
placement=
"top"
>
<a-button
type=
"primary"
@
click=
"handleMove
.bind(null, 0, record
)"
>
<a-button
type=
"primary"
@
click=
"handleMove
(0, getRowSelection().selectedRowKeys
)"
>
<Icon
icon=
"majesticons:duplicate-line"
:size=
"20"
/>
</a-button>
</Tooltip>
<Tooltip
title=
"移动"
placement=
"top"
>
<a-button
type=
"primary"
@
click=
"handleMove
.bind(null, 1, record
)"
>
<a-button
type=
"primary"
@
click=
"handleMove
(1, getRowSelection().selectedRowKeys
)"
>
<Icon
icon=
"majesticons:arrow-right"
:size=
"20"
/>
</a-button>
</Tooltip>
<Tooltip
title=
"删除"
placement=
"top"
>
<a-button
type=
"primary"
@
click=
"deleteButton
.bind(null, record, 1)
"
>
<a-button
type=
"primary"
@
click=
"deleteButton"
>
<Icon
icon=
"majesticons:trash-line"
:size=
"20"
/>
</a-button>
</Tooltip>
...
...
@@ -56,6 +56,10 @@
label: '编辑',
onClick: handleGroupSelect.bind(null, record, 0),
},
{
label: '重命名',
onClick: resetName.bind(null, record),
},
{
label: '复制',
onClick: handleMove.bind(null, 0, record),
...
...
@@ -77,6 +81,7 @@
<importModal
@
register=
"registerImport"
@
success=
"handleImportSuccess"
/>
<AddFolder
@
register=
"register"
/>
<TemplateModal
@
register=
"registerTemplate"
/>
<Rename
@
register=
"registerRename"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
...
...
@@ -96,6 +101,7 @@
import
TemplateModal
from
'./addFile/templateModal.vue'
;
import
MoveFile
from
'./handleMove/moveFile.vue'
;
import
importModal
from
'./importModal/importModal.vue'
;
import
Rename
from
'./renameModal.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
downloadByData
}
from
'@/utils/file/download'
;
...
...
@@ -108,6 +114,7 @@
const
[
registerImport
,
{
openModal
:
openImportModal
}]
=
useModal
();
const
[
registerMoveFile
,
{
openModal
:
openMoveFileModal
}]
=
useModal
();
const
[
registerTemplate
,
{
openModal
:
openTemplateModal
}]
=
useModal
();
const
[
registerRename
,
{
openModal
:
openRenameModal
}]
=
useModal
();
const
[
register
,
{
openModal
:
openAddFolder
}]
=
useModal
();
const
[
registerTable
,
...
...
@@ -210,6 +217,14 @@
},
});
}
///重命名
function
resetName
(
record
)
{
openRenameModal
(
true
,
{
name
:
record
.
name
,
workSpaceName
:
record
.
workSpaceName
,
title
:
'重命名'
,
});
}
/** 导出按钮*/
async
function
handleExport
()
{
console
.
log
(
'导出----'
);
...
...
src/views/scriptDevelopment/shellDevelopment/mainBody.data.ts
0 → 100644
View file @
00b816a0
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
export
const
columns
:
BasicColumn
[]
=
[
{
title
:
'名称'
,
dataIndex
:
'name'
,
width
:
150
,
sorter
:
true
,
},
{
title
:
'规则描述'
,
dataIndex
:
'ruleDescription'
,
width
:
120
,
},
{
title
:
'规则类型'
,
dataIndex
:
'ruleType'
,
width
:
120
,
sorter
:
true
,
},
{
title
:
'规则处置'
,
dataIndex
:
'ruleHandling'
,
width
:
120
,
sorter
:
true
,
},
{
title
:
'创建时间'
,
dataIndex
:
'creationTime'
,
width
:
120
,
sorter
:
true
,
},
{
title
:
'更新时间'
,
dataIndex
:
'updateTime'
,
width
:
120
,
sorter
:
true
,
},
{
title
:
'拥有者'
,
dataIndex
:
'owner'
,
width
:
150
,
sorter
:
true
,
},
];
export
const
personSchema
:
FormSchema
[]
=
[
{
field
:
'name'
,
component
:
'Input'
,
colProps
:
{
lg
:
11
,
md
:
11
},
label
:
'名称'
,
required
:
true
,
},
{
field
:
'ruleDescription'
,
label
:
'规则描述'
,
colProps
:
{
lg
:
11
,
md
:
11
},
component
:
'InputTextArea'
,
},
{
field
:
'ruleHandling'
,
label
:
'规则处置'
,
colProps
:
{
lg
:
11
,
md
:
11
},
component
:
'Select'
,
required
:
true
,
componentProps
:
{
placeholder
:
'规则处置方式'
,
options
:
[
{
label
:
'建议优化'
,
value
:
'1'
},
{
label
:
'禁止执行'
,
value
:
'2'
},
{
label
:
'admin'
,
value
:
'3'
},
],
},
},
{
field
:
'disposalSuggestions'
,
label
:
'处置建议'
,
colProps
:
{
lg
:
11
,
md
:
11
},
component
:
'InputTextArea'
,
required
:
true
,
componentProps
:
{
placeholder
:
'请输入处置建议'
,
},
},
{
field
:
'sql'
,
label
:
'规则内容'
,
required
:
true
,
slot
:
'ruleContentSlot'
,
},
{
field
:
'ruleContent'
,
slot
:
'buttonSlot'
,
},
];
export
const
MoveFormSchema
:
any
[]
=
[
{
field
:
'taskId'
,
label
:
'路径'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
fieldNames
:
{
label
:
'workSpaceName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
required
:
true
,
},
];
export
const
addFileFormSchema
:
any
[]
=
[
{
field
:
'taskId'
,
label
:
'路径'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
fieldNames
:
{
label
:
'workSpaceName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
required
:
true
,
},
{
field
:
'name'
,
component
:
'Input'
,
label
:
'名称'
,
required
:
true
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
];
export
const
renameSchema
:
FormSchema
[]
=
[
{
field
:
'workSpaceName'
,
label
:
'名称'
,
component
:
'Input'
,
required
:
true
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
];
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
field
:
'name'
,
label
:
' '
,
component
:
'Input'
,
colProps
:
{
span
:
5
},
componentProps
:
{
placeholder
:
'输入关键字搜索'
,
},
},
];
src/views/scriptDevelopment/shellDevelopment/renameModal.vue
0 → 100644
View file @
00b816a0
<
template
>
<BasicModal
width=
"30%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"title"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
onMounted
,
ref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
renameSchema
}
from
'./mainBody.data'
;
defineOptions
({
name
:
'KnowledgeModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
title
=
ref
();
const
rowId
=
ref
(
''
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
resetFields
}]
=
useForm
({
schemas
:
renameSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
workSpaceName
=
data
.
workSpaceName
;
setFieldsValue
({
workSpaceName
});
setModalProps
({
confirmLoading
:
false
});
title
.
value
=
data
.
title
;
});
async
function
handleSubmit
()
{
closeModal
();
createMessage
.
success
(
'提交成功'
);
resetFields
;
}
onMounted
(()
=>
{});
</
script
>
src/views/scriptDevelopment/shellDevelopment/shellExecute/versionManagementModal.vue
View file @
00b816a0
...
...
@@ -20,8 +20,8 @@
onClick: handleDetail,
},
{
icon: '
ant-design:edit-outlined
',
tooltip: '
编辑
',
icon: '
majesticons:file-search-line
',
tooltip: '
版本对比
',
onClick: modEdit,
},
{
...
...
@@ -70,8 +70,7 @@
closeModal
();
}
function
modEdit
()
{
console
.
log
(
'编辑'
);
closeModal
();
console
.
log
(
'版本对比'
);
}
function
handleVersionRollback
()
{
message
.
success
(
'回退成功'
);
...
...
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