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
f2102ca5
Commit
f2102ca5
authored
Dec 12, 2024
by
chenjiahao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shell开发-修改已知问题
parent
eff0cfa8
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
422 additions
and
297 deletions
+422
-297
CodeEditor.vue
src/components/CodeEditor/src/CodeEditor.vue
+1
-1
editAuditRulesModal.vue
...iptDevelopment/functionManagement/editAuditRulesModal.vue
+73
-75
index.vue
src/views/scriptDevelopment/functionManagement/index.vue
+33
-27
DataTree.vue
src/views/scriptDevelopment/shellDevelopment/DataTree.vue
+7
-2
importModal.vue
...tDevelopment/shellDevelopment/importModal/importModal.vue
+24
-5
tempalte.data.ts
...Development/shellDevelopment/importModal/tempalte.data.ts
+42
-10
index.vue
src/views/scriptDevelopment/shellDevelopment/index.vue
+112
-86
optionsModal.vue
...evelopment/shellDevelopment/shellExecute/optionsModal.vue
+1
-1
shellExecute.vue
...evelopment/shellDevelopment/shellExecute/shellExecute.vue
+125
-86
sqlDevelopmentData.ts
.../scriptDevelopment/shellDevelopment/sqlDevelopmentData.ts
+4
-4
No files found.
src/components/CodeEditor/src/CodeEditor.vue
View file @
f2102ca5
<
template
>
<div
class=
"h-full"
>
<div>
<CodeMirrorEditor
:value=
"getValue"
@
change=
"handleValueChange"
...
...
src/views/scriptDevelopment/functionManagement/editAuditRulesModal.vue
View file @
f2102ca5
<
template
>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex flex-col"
class=
"toolbar"
style=
"width: 910px; "
>
<div
class=
"toolbar"
style=
"background: white;"
>
<div
class=
"tools"
>
<a-button
type=
"primary"
style=
"float: right; margin: 10px 15px 10px 0"
@
click=
"preservation"
>
保存
</a-button>
<
template
>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex flex-col"
class=
"toolbar"
style=
"width: 910px"
>
<div
class=
"toolbar"
style=
"background: white"
>
<div
class=
"tools"
>
<a-button
type=
"primary"
style=
"float: right; margin: 10px 15px 10px 0"
@
click=
"preservation"
>
保存
</a-button
>
</div>
</div>
<BasicForm
style=
"background: white; height: 686px;"
size=
"middle"
:bordered=
"false"
:column=
"2"
:model=
"info"
@
register=
"registerGuideModeForm"
style=
"background: white; height: 686px"
size=
"middle"
:bordered=
"false"
:column=
"2"
:model=
"info"
@
register=
"registerGuideModeForm"
>
<template
#
fileSlot
>
<div
style=
"display: flex; width: 342px"
>
<a-button
type=
"primary"
>
文件选择
</a-button>
<p
style=
"margin: 5px"
>
仅允许导入单个.jar文件
</p>
</div>
<div
style=
"margin-top: 10px
;
"
>
<div
style=
"margin-top: 10px"
>
<a-input
style=
"width: 342px; margin-right: auto"
allowClear
/>
</div>
</
template
>
</BasicForm>
<SaveSettingsModal
@
register=
"saveSettings"
/>
</PageWrapper>
...
...
@@ -35,71 +43,61 @@
</template>
<
script
lang=
"ts"
setup
>
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
tableList
}
from
'./mock'
;
import
{
personSchema
}
from
'./mainBody.data'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
SaveSettingsModal
from
'./saveSettingsModal.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
computed
,
onMounted
}
from
'vue'
;
const
[
saveSettings
,
{
openModal
:
openModal
}]
=
useModal
();
// 新建质量主体弹窗
const
pros
=
defineProps
({
deptId
:
{
type
:
Number
,
default
:
0
,
},
});
import
{
PageWrapper
}
from
"@/components/Page"
;
import
{
tableList
}
from
"./mock"
;
import
{
personSchema
}
from
"./mainBody.data"
;
import
{
BasicForm
,
useForm
}
from
"@/components/Form"
;
import
SaveSettingsModal
from
"./saveSettingsModal.vue"
;
import
{
useModal
}
from
"@/components/Modal"
;
import
{
computed
,
onMounted
}
from
"vue"
;
const
[
saveSettings
,
{
openModal
:
openModal
}]
=
useModal
();
// 新建质量主体弹窗
// 初始化 info 为一个响应式对象
const
info
=
computed
(()
=>
{
const
list
=
tableList
;
const
index
=
list
.
findIndex
((
item
)
=>
{
return
item
.
selectedDeptId
===
pros
.
deptId
;
// 添加 return 关键字
});
console
.
log
(
'list'
,
list
);
console
.
log
(
'index'
,
index
);
console
.
log
(
'deptId'
,
pros
.
deptId
);
if
(
index
!==
-
1
)
{
return
list
[
index
];
}
return
{};
});
const
pros
=
defineProps
({
deptId
:
{
type
:
Number
,
default
:
0
,
function
palyStart
()
{
setFieldsValue
(
info
.
value
);
}
})
// 初始化 info 为一个响应式对象
const
info
=
computed
(()
=>
{
const
list
=
tableList
;
const
index
=
list
.
findIndex
((
item
)
=>
{
return
item
.
selectedDeptId
===
pros
.
deptId
;
// 添加 return 关键字
onMounted
(()
=>
{
console
.
log
(
'tableList'
,
tableList
);
palyStart
();
});
console
.
log
(
'list'
,
list
);
console
.
log
(
'index'
,
index
);
console
.
log
(
'deptId'
,
pros
.
deptId
);
if
(
index
!==
-
1
)
{
return
list
[
index
];
}
return
{};
});
function
palyStart
()
{
setFieldsValue
(
info
.
value
);
}
onMounted
(()
=>
{
console
.
log
(
'tableList'
,
tableList
)
palyStart
();
});
function
preservation
()
{
openModal
(
true
,
{
isUpdate
:
false
,
});
}
function
preservation
()
{
openModal
(
true
,
{
isUpdate
:
false
,
const
[
registerGuideModeForm
,
{
setFieldsValue
}]
=
useForm
({
labelWidth
:
100
,
schemas
:
personSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
}
const
[
registerGuideModeForm
,{
setFieldsValue
}]
=
useForm
({
labelWidth
:
100
,
schemas
:
personSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
</
script
>
<
style
scoped
>
</
style
>
<
style
scoped
></
style
>
src/views/scriptDevelopment/functionManagement/index.vue
View file @
f2102ca5
...
...
@@ -8,26 +8,32 @@
:deptId=
"selectedDeptId"
/>
<div
class=
"m-4 mr-0 w-3/4 xl:w-4/5"
v-else
>
<div
style=
"display: flex; align-items: center; background-color: white"
>
<Icon
icon=
"majesticons:table-plus-line"
:size=
"40"
:color=
"'#e9a064'"
/>
<div
style=
"margin-left: 10px"
>
<span
class=
"title"
>
test
</span>
<div>
<span
class=
"path"
>
函数/test
</span>
<div
style=
"
padding: 15px;
display: flex;
justify-content: space-between;
align-items: center;
background-color: white;
"
>
<div
style=
"display: flex"
>
<Icon
icon=
"majesticons:table-plus-line"
:size=
"40"
:color=
"'#e9a064'"
/>
<div
style=
"margin-left: 10px"
>
<span
class=
"title"
>
test
</span>
<div>
<span
class=
"path"
>
函数/test
</span>
</div>
</div>
</div>
<a-button
style=
"margin-left: 700px"
type=
"primary"
@
click=
"handleDeleteIds"
>
删除
</a-button>
<a-button
style=
"margin-left: 10px"
type=
"primary"
@
click=
"handleMove(1)"
>
移动
</a-button>
<a-button
style=
"margin-left: 10px"
type=
"primary"
@
click=
"handleExport('文件')"
>
导出
</a-button
>
<a-button
style=
"margin-left: 10px"
type=
"primary"
@
click=
"handleImport"
>
导入
</a-button>
<a-button
style=
"margin-left: 10px"
type=
"primary"
@
click=
"handleNewFolder"
>
新建文件夹
</a-button
>
<a-button
style=
"margin-left: 10px"
type=
"primary"
@
click=
"handleNewFile"
>
新建文件
</a-button
>
<div
style=
"display: flex; gap: 10px"
>
<a-button
type=
"primary"
@
click=
"handleDeleteIds"
>
删除
</a-button>
<a-button
type=
"primary"
@
click=
"handleMove(1)"
>
移动
</a-button>
<a-button
type=
"primary"
@
click=
"handleExport('文件')"
>
导出
</a-button>
<a-button
type=
"primary"
@
click=
"handleImport"
>
导入
</a-button>
<a-button
type=
"primary"
@
click=
"handleNewFolder"
>
新建文件夹
</a-button>
<a-button
type=
"primary"
@
click=
"handleNewFile"
>
新建文件
</a-button>
</div>
</div>
<BasicTable
@
register=
"registerTable"
:searchInfo=
"searchInfo"
>
<template
#
bodyCell=
"
{ column, record }">
...
...
@@ -45,7 +51,7 @@
onClick: handleMove.bind(null, 1),
},
{
icon: 'material-symbols
-light
:delete-outline',
icon: 'material-symbols:delete-outline',
tooltip: '删除',
popConfirm: {
title: '是否确认删除',
...
...
@@ -199,12 +205,12 @@
};
</
script
>
<
style
scoped
>
.title
{
font-size
:
16
px
;
font-weight
:
500
;
}
.path
{
font-size
:
14px
;
color
:
gray
;
}
.title
{
font-size
:
20
px
;
font-weight
:
500
;
}
.path
{
font-size
:
14px
;
color
:
gray
;
}
</
style
>
src/views/scriptDevelopment/shellDevelopment/DataTree.vue
View file @
f2102ca5
<
template
>
<div
class=
"m
-5 mr-0 overflow-hidden bg-white
"
>
<div
class=
"m
r-0 overflow-hidden bg-white p-5
"
>
<BasicTree
title=
""
ref=
"treeRef"
search
treeWrapperClassName=
"h-[calc(100%-35px)] overflow-auto"
:defaultExpandAll=
"true"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: 'workSpaceName' }"
@select="handleSelect"
:actionList="actionList"
/>
>
<template
#
headerTitle
>
<span></span>
</
template
>
</BasicTree>
</div>
</template>
<
script
lang=
"ts"
setup
>
...
...
src/views/scriptDevelopment/shellDevelopment/importModal/importModal.vue
View file @
f2102ca5
...
...
@@ -8,11 +8,20 @@
>
<BasicForm
@
register=
"registerForm"
>
<template
#
fileMethods=
"
{ model, field }">
<div
style=
"display: flex"
>
<div>
<a-button>
下载模板
</a-button>
<a-button
type=
"primary"
style=
"margin-left: 5px"
>
选择文件
</a-button>
</div>
<div
style=
"display: flex; gap: 10px"
>
<a-button
@
click=
"handleExport"
>
下载模板
</a-button>
<BasicUpload
:maxSize=
"20"
:maxNumber=
"10"
@
change=
"handleChange"
:api=
"uploadApi"
:accept=
"['image/*']"
>
<template
#
uploadBtnName
>
<span>
选择文件
</span>
</
template
>
</BasicUpload>
<!-- <a-button type="primary" style="margin-left: 5px">选择文件</a-button>-->
</div>
</template>
</BasicForm>
...
...
@@ -23,6 +32,9 @@
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
importFormSchema
}
from
'./tempalte.data'
;
import
{
exportRoleList
}
from
'@/api/system/role/role'
;
import
{
downloadByData
}
from
'@/utils/file/download'
;
import
{
BasicUpload
}
from
'@/components/Upload'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
isUpdate
=
ref
(
true
);
...
...
@@ -56,6 +68,13 @@
});
// onMounted(){}
/** 导出按钮*/
async
function
handleExport
()
{
console
.
log
(
'导出----'
);
const
params
=
Object
.
assign
({},
{});
const
data
=
await
exportRoleList
(
params
);
downloadByData
(
data
,
'导入模板'
+
'.xlsx'
);
}
// const getTitle = computed(() => '新建文件');
const
getTitle
=
'导入文件选择'
;
...
...
src/views/scriptDevelopment/shellDevelopment/importModal/tempalte.data.ts
View file @
f2102ca5
export
const
importFormSchema
:
any
[]
=
[
import
{
Schema
}
from
'tinymce'
;
import
{
FormSchema
}
from
'@/components/Form'
;
export
const
importFormSchema
:
FormSchema
[]
=
[
{
field
:
'deptId'
,
label
:
'导入至'
,
...
...
@@ -11,26 +14,54 @@ export const importFormSchema: any[] = [
},
treeData
:
[
{
deptName
:
'
个人工作组
'
,
businessId
:
'1'
,
deptName
:
'
SHELL文件
'
,
businessId
:
'1
00
'
,
children
:
[
{
deptName
:
'个人工作区'
,
businessId
:
'11'
,
deptName
:
'
admin-
个人工作区'
,
businessId
:
'1
0
1'
,
children
:
[
{
deptName
:
'图标验收'
,
businessId
:
'111'
,
deptName
:
'文件夹1'
,
businessId
:
'201'
,
children
:
[
{
deptName
:
'SQL1'
,
businessId
:
'301'
,
},
],
},
],
},
{
deptName
:
'共享工作区'
,
businessId
:
'12'
,
businessId
:
'1
0
2'
,
children
:
[
{
deptName
:
'学生成绩'
,
businessId
:
'122'
,
deptName
:
'文件夹2'
,
businessId
:
'202'
,
children
:
[
{
deptName
:
'SQL2'
,
businessId
:
'302'
,
},
],
},
],
},
{
deptName
:
'高级工作区'
,
businessId
:
'103'
,
children
:
[
{
deptName
:
'文件夹3'
,
businessId
:
'203'
,
children
:
[
{
deptName
:
'SQL3'
,
businessId
:
'303'
,
},
],
},
],
},
...
...
@@ -51,6 +82,7 @@ export const importFormSchema: any[] = [
label
:
'文件重名'
,
component
:
'RadioGroup'
,
required
:
true
,
defaultValue
:
'全部放弃'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
options
:
[
...
...
src/views/scriptDevelopment/shellDevelopment/index.vue
View file @
f2102ca5
...
...
@@ -4,61 +4,80 @@
<DataTree
@
select=
"handleSelect"
style=
"height: 100%"
/>
<!--
<GroupTree
@
select=
"handleGroupSelect"
style=
"height: 50%"
/>
-->
</div>
<BasicTable
@
register=
"registerTable"
class=
"w-3/4 xl:w-4/5"
:searchInfo=
"searchInfo"
>
<template
#
toolbar
>
<Tooltip
title=
"复制"
placement=
"top"
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleMove(0, getRowSelection().selectedRowKeys)"
>
<Icon
icon=
"majesticons:duplicate-line"
:size=
"20"
/>
</a-button>
</Tooltip>
<Tooltip
title=
"移动"
placement=
"top"
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleMove(1, getRowSelection().selectedRowKeys)"
>
<Icon
icon=
"majesticons:arrow-right"
:size=
"20"
/>
</a-button>
</Tooltip>
<Tooltip
title=
"删除"
placement=
"top"
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"deleteButton"
>
<Icon
icon=
"majesticons:trash-line"
:size=
"20"
/>
</a-button>
</Tooltip>
<Tooltip
title=
"导入"
placement=
"top"
>
<a-button
type=
"primary"
@
click=
"handleImport"
>
<Icon
icon=
"majesticons:cloud-upload-line"
:size=
"20"
/>
</a-button>
</Tooltip>
<Tooltip
title=
"导出"
placement=
"top"
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleExport"
>
<Icon
icon=
"majesticons:cloud-download-line"
:size=
"20"
/>
</a-button>
</Tooltip>
<Tooltip
title=
"新建文件夹"
placement=
"top"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleAddFolder"
>
<Icon
icon=
"majesticons:folder-add-line"
:size=
"20"
/>
</a-button>
</Tooltip>
<Tooltip
title=
"新建文件"
placement=
"top"
>
<a-button
type=
"primary"
@
click=
"handleAddTemplate"
>
<Icon
icon=
"majesticons:file-add-line"
:size=
"20"
/>
</a-button>
</Tooltip>
<BasicTable
title=
" "
@
register=
"registerTable"
class=
"w-3/4 xl:w-4/5"
:searchInfo=
"searchInfo"
>
<template
#
headerTop
>
<div
style=
"display: flex; justify-content: space-between; align-items: center"
>
<div
style=
"display: flex; gap: 5px"
>
<Icon
size=
"35"
icon=
"mdi:powershell"
:color=
"'#fda861'"
/>
<div
style=
"display: flex; flex-direction: column"
>
<span
style=
"font-weight: bold; font-size: 18px"
>
Shell开发
</span>
<!--
<span
style=
"color: grey; font-size: 12px"
>
{{
searchInfo
.
res
.
workSpaceName
}}
</span>
-->
</div>
</div>
<div
style=
"display: flex; gap: 10px"
>
<Tooltip
title=
"复制"
placement=
"top"
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleMove(0, getRowSelection().selectedRowKeys)"
>
复制
<!--
<Icon
icon=
"majesticons:duplicate-line"
:size=
"20"
/>
-->
</a-button>
</Tooltip>
<Tooltip
title=
"移动"
placement=
"top"
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleMove(1, getRowSelection().selectedRowKeys)"
>
移动
<!--
<Icon
icon=
"majesticons:arrow-right"
:size=
"20"
/>
-->
</a-button>
</Tooltip>
<Tooltip
title=
"删除"
placement=
"top"
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"deleteButton"
>
删除
<!--
<Icon
icon=
"majesticons:trash-line"
:size=
"20"
/>
-->
</a-button>
</Tooltip>
<Tooltip
title=
"导入"
placement=
"top"
>
<a-button
type=
"primary"
@
click=
"handleImport"
>
导入
<!--
<Icon
icon=
"majesticons:cloud-upload-line"
:size=
"20"
/>
-->
</a-button>
</Tooltip>
<Tooltip
title=
"导出"
placement=
"top"
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleExport"
>
导出
<!--
<Icon
icon=
"majesticons:cloud-download-line"
:size=
"20"
/>
-->
</a-button>
</Tooltip>
<Tooltip
title=
"新建文件夹"
placement=
"top"
>
<a-button
type=
"primary"
@
click=
"handleAddFolder"
>
新建文件夹
<!--
<Icon
icon=
"majesticons:folder-add-line"
:size=
"20"
/>
-->
</a-button>
</Tooltip>
<Tooltip
title=
"新建文件"
placement=
"top"
>
<a-button
type=
"primary"
@
click=
"handleAddTemplate"
>
新建文件
<!--
<Icon
icon=
"majesticons:file-add-line"
:size=
"20"
/>
-->
</a-button>
</Tooltip>
</div>
</div>
</
template
>
<
template
#
tableTitle
>
<a-input-search
allow-clear
style=
"width: 220px"
@
search=
"onSearch"
/>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
...
...
@@ -90,7 +109,7 @@
</template>
</BasicTable>
<MoveFile
@
register=
"registerMoveFile"
@
success=
"handleMoveSuccess"
/>
<
i
mportModal
@
register=
"registerImport"
@
success=
"handleImportSuccess"
/>
<
I
mportModal
@
register=
"registerImport"
@
success=
"handleImportSuccess"
/>
<AddFolder
@
register=
"register"
/>
<TemplateModal
@
register=
"registerTemplate"
/>
<Rename
@
register=
"registerRename"
/>
...
...
@@ -98,7 +117,7 @@
</template>
<
script
lang=
"ts"
setup
>
import
{
Tooltip
}
from
'ant-design-vue'
;
import
{
reactive
,
onMounted
}
from
'vue'
;
import
{
reactive
,
ref
,
onMounted
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
getRoleListByPage
,
deleteById
,
exportRoleList
}
from
'@/api/system/role/role'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
...
...
@@ -112,15 +131,18 @@
import
AddFolder
from
'./addFolder/addFolder.vue'
;
import
TemplateModal
from
'./addFile/templateModal.vue'
;
import
MoveFile
from
'./handleMove/moveFile.vue'
;
import
i
mportModal
from
'./importModal/importModal.vue'
;
import
I
mportModal
from
'./importModal/importModal.vue'
;
import
Rename
from
'./renameModal.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
downloadByData
}
from
'@/utils/file/download'
;
import
{
tooltipProps
}
from
'ant-design-vue/es/tooltip'
;
import
{
getMetadataTableList
}
from
'@/views/dataIntegration/dataLakePunctual/mock'
;
defineOptions
({
name
:
'AccountManagement'
});
let
DataTreeDataList
=
ref
(
DataTreeData
);
const
searchInfo
=
reactive
<
Recordable
>
({});
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
[
registerImport
,
{
openModal
:
openImportModal
}]
=
useModal
();
...
...
@@ -128,47 +150,34 @@
const
[
registerTemplate
,
{
openModal
:
openTemplateModal
}]
=
useModal
();
const
[
registerRename
,
{
openModal
:
openRenameModal
}]
=
useModal
();
const
[
register
,
{
openModal
:
openAddFolder
}]
=
useModal
();
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
},
]
=
useTable
({
title
:
'SHELL文件'
,
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getForm
,
getRowSelection
}]
=
useTable
({
// title: 'SHELL文件',
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
DataTreeData
.
length
,
total
:
DataTreeData
List
.
value
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
let
data
=
DataTreeData
.
filter
((
item
)
=>
item
.
parentId
!==
0
);
if
(
params
.
res
!==
undefined
)
{
if
(
params
.
res
.
parentId
!==
undefined
)
{
data
=
DataTreeData
.
filter
((
item
)
=>
item
.
parentId
===
params
.
res
.
businessId
);
}
else
{
data
=
DataTreeData
.
filter
((
item
)
=>
item
.
parentId
===
100
);
}
}
else
{
data
=
DataTreeData
.
filter
((
item
)
=>
item
.
parentId
===
100
);
}
return
{
...
response
,
data
:
data
};
return
{
...
response
,
data
:
DataTreeDataList
.
value
};
},
rowKey
:
'businessId'
,
rowSelection
:
true
,
columns
,
showIndexColumn
:
false
,
formConfig
:
{
labelWidth
:
10
,
schemas
:
searchFormSchema
,
autoSubmitOnEnter
:
true
,
resetFunc
:
()
=>
{
searchInfo
.
res
=
''
;
},
},
useSearchForm
:
true
,
//
formConfig: {
//
labelWidth: 10,
//
schemas: searchFormSchema,
//
autoSubmitOnEnter: true,
//
resetFunc: () => {
//
searchInfo.res = '';
//
},
//
},
//
useSearchForm: true,
showTableSetting
:
false
,
bordered
:
true
,
handleSearchInfoFn
(
info
)
{
...
...
@@ -269,10 +278,27 @@
reload
();
}
function
handleGroupSelect
()
{
function
onSearch
(
searchValue
)
{
console
.
log
(
searchValue
);
DataTreeDataList
.
value
=
DataTreeData
.
filter
(
(
item
)
=>
item
.
workSpaceName
.
includes
(
searchValue
)
&&
!
[
0
,
100
,
101
,
102
,
103
].
includes
(
item
.
parentId
),
);
reload
();
}
function
handleGroupSelect
(
record
)
{
router
.
push
({
path
:
'/scriptDevelopment/shellDevelopment/shellExecute/shellExecute'
,
query
:
{
id
:
record
.
businessId
,
},
});
}
onMounted
(()
=>
{});
onMounted
(()
=>
{
DataTreeDataList
.
value
=
DataTreeData
.
filter
(
(
item
)
=>
!
[
0
,
100
,
101
,
102
,
103
].
includes
(
item
.
parentId
),
);
});
</
script
>
src/views/scriptDevelopment/shellDevelopment/shellExecute/optionsModal.vue
View file @
f2102ca5
...
...
@@ -65,7 +65,7 @@
columns
:
recommendColumns
,
useSearchForm
:
false
,
actionColumn
:
{
width
:
15
0
,
width
:
6
0
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
...
...
src/views/scriptDevelopment/shellDevelopment/shellExecute/shellExecute.vue
View file @
f2102ca5
<
template
>
<PageWrapper
title=
"shell执行"
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
@
back=
"goBack"
>
<PageWrapper
title=
" "
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<!--
<GroupTree
@
select=
"handleSelect"
class=
"w-1/4 xl:w-1/5"
/>
-->
<div
class=
"w-full xl:w-full"
style=
"padding-top: 20px"
>
<BasicForm
@
register=
"registerForm"
>
<template
#
formFooter
>
<div
style=
"display: flex; justify-content: space-between; margin-left: 500px"
>
<!-- 新窗口运行-->
<!--
<Tooltip
placement=
"top"
title=
"新窗口运行"
>
<a-button
type=
"primary"
style=
"margin-right: 10px; margin-left: 500px"
@
click=
"handleExecute"
>
<Icon
icon=
"si:play-forward-duotone"
:size=
"20"
/>
</a-button>
</Tooltip>
-->
<template
#
headerContent
>
<div
style=
"width: 100%; display: flex; align-items: center; justify-content: space-between"
>
<div
style=
"display: flex; align-items: center"
>
<Icon
@
click=
"goBack"
class=
"backBtn"
icon=
"eva:arrow-ios-back-fill"
:size=
"25"
color=
"grey"
/>
<span
style=
"color: grey; margin-left: 10px"
>
{{
path
}}
</span>
</div>
<div
style=
"display: flex; margin-left: 500px"
>
<!-- 新窗口运行-->
<!--
<Tooltip
placement=
"top"
title=
"新窗口运行"
>
<a-button
type=
"primary"
style=
"margin-right: 10px; margin-left: 500px"
@
click=
"handleExecute"
>
<Icon
icon=
"si:play-forward-duotone"
:size=
"20"
/>
</a-button>
</Tooltip>
-->
<!-- 运行-->
<!--
<Tooltip
placement=
"top"
title=
"运行"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleExecute"
>
<Icon
icon=
"si:play-line"
:size=
"20"
/>
</a-button>
</Tooltip>
-->
<!-- 运行-->
<!--
<Tooltip
placement=
"top"
title=
"运行"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleExecute"
>
<Icon
icon=
"si:play-line"
:size=
"20"
/>
</a-button>
</Tooltip>
-->
<!-- 执行记录-->
<!--
<Tooltip
placement=
"top"
title=
"执行记录"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleRecord"
>
<Icon
icon=
"si:clock-alt-line"
:size=
"20"
/>
</a-button>
</Tooltip>
-->
<!-- 执行记录-->
<!--
<Tooltip
placement=
"top"
title=
"执行记录"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleRecord"
>
<Icon
icon=
"si:clock-alt-line"
:size=
"20"
/>
</a-button>
</Tooltip>
-->
<!-- 提交版本-->
<Tooltip
placement=
"top"
title=
"提交版本"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSubmit"
>
<Icon
icon=
"majesticons:cloud-upload-line"
:size=
"20"
/>
</a-button>
</Tooltip>
<!-- 提交版本-->
<Tooltip
placement=
"top"
title=
"提交版本"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSubmit"
>
提交版本
<!--
<Icon
icon=
"majesticons:cloud-upload-line"
:size=
"20"
/>
-->
</a-button>
</Tooltip>
<!-- 版本管理-->
<Tooltip
placement=
"top"
title=
"版本管理"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleVersion"
>
<Icon
icon=
"majesticons:file-search-line"
:size=
"20"
/>
</a-button>
</Tooltip>
<!-- 版本管理-->
<Tooltip
placement=
"top"
title=
"版本管理"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleVersion"
>
版本管理
<!--
<Icon
icon=
"majesticons:file-search-line"
:size=
"20"
/>
-->
</a-button>
</Tooltip>
<!-- 参数配置-->
<Tooltip
placement=
"top"
title=
"参数配置"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleOptions"
>
<Icon
icon=
"majesticons:link-circle-line"
:size=
"20"
/>
</a-button>
</Tooltip>
<!-- 参数配置-->
<Tooltip
placement=
"top"
title=
"参数配置"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleOptions"
>
参数配置
<!--
<Icon
icon=
"majesticons:link-circle-line"
:size=
"20"
/>
-->
</a-button>
</Tooltip>
<!-- 格式化-->
<Tooltip
placement=
"top"
title=
"格式化"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleChange"
>
<Icon
icon=
"gg:align-left"
:size=
"20"
/>
</a-button>
</Tooltip>
<!-- 格式化-->
<!--
<Tooltip
placement=
"top"
title=
"格式化"
>
-->
<!--
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleChange"
>
-->
<!-- 格式化-->
<!-- <!–
<Icon
icon=
"gg:align-left"
:size=
"20"
/>
–>
-->
<!--
</a-button>
-->
<!--
</Tooltip>
-->
<!-- 保存-->
<!--
<Tooltip
placement=
"top"
title=
"保存"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSave"
>
<Icon
icon=
"majesticons:save-line"
:size=
"20"
/>
</a-button>
</Tooltip>
<Tooltip
placement=
"top"
:title=
"layout === 'single' ? '版本对比' : '结束对比'"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"toggleLayout"
>
<Icon
:icon=
"layout === 'single' ? 'majesticons:user-line' : 'majesticons:users-line'"
:size=
"20"
/>
</a-button>
</Tooltip>
-->
</div>
</
template
>
</BasicForm>
<!-- 保存-->
<Tooltip
placement=
"top"
title=
"保存"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSave"
>
保存
<!--
<Icon
icon=
"majesticons:save-line"
:size=
"20"
/>
-->
</a-button>
</Tooltip>
<!--
<Tooltip
placement=
"top"
:title=
"layout === 'single' ? '版本对比' : '结束对比'"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"toggleLayout"
>
<Icon
:icon=
"layout === 'single' ? 'majesticons:user-line' : 'majesticons:users-line'"
:size=
"20"
/>
</a-button>
</Tooltip>
-->
</div>
</div>
</
template
>
<div
class=
"w-full xl:w-full"
style=
"background-color: white"
>
<div
style=
"width: 100%; margin-top: 20px"
>
<div
v-if=
"layout === 'single'"
>
<CodeEditor
v-model:value=
"jsonData"
:mode=
"MODE.
JSON
"
/>
<div
class=
"codeEditorH"
style=
"padding: 0 15px"
v-if=
"layout === 'single'"
>
<CodeEditor
v-model:value=
"jsonData"
:mode=
"MODE.
SHELL
"
/>
</div>
<div
v-else
class=
"editor-container"
>
<div
class=
"editor-wrapper"
style=
"height: 600px"
>
...
...
@@ -108,12 +117,12 @@
</div>
</div>
</div>
<
o
ptionsModal
@
register=
"registerModal"
/>
<
r
esultModal
@
register=
"registerResultModal"
/>
<
O
ptionsModal
@
register=
"registerModal"
/>
<
R
esultModal
@
register=
"registerResultModal"
/>
<PreviewModal
@
register=
"registerPreviewModal"
/>
<RecordModal
@
register=
"registerRecordModal"
/>
<SubmitModal
@
register=
"registerSubmitModal"
/>
<
v
ersionManagementModal
@
register=
"registerVersionManagementModal"
/>
<
V
ersionManagementModal
@
register=
"registerVersionManagementModal"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
...
...
@@ -121,26 +130,30 @@
import
{
onMounted
,
ref
,
nextTick
,
watch
}
from
'vue'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
GroupTree
from
'../GroupTree.vue'
;
import
{
jsonData
}
from
'../sqlDevelopmentData'
;
import
{
jsonData
,
DataTreeData
}
from
'../sqlDevelopmentData'
;
import
{
formSchema
}
from
'../data'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
CodeEditor
,
MODE
}
from
'@/components/CodeEditor'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
o
ptionsModal
from
'./optionsModal.vue'
;
import
O
ptionsModal
from
'./optionsModal.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
r
esultModal
from
'./resultModal.vue'
;
import
R
esultModal
from
'./resultModal.vue'
;
import
PreviewModal
from
'./dataPreviewModal.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
RecordModal
from
'./executeRecordModal.vue'
;
import
SubmitModal
from
'./handleSubmit/submitModal.vue'
;
import
{
schema
}
from
'@/views/dataIntegration/taskOM/taskOM.data'
;
import
versionManagementModal
from
'./versionManagementModal.vue'
;
import
VersionManagementModal
from
'./versionManagementModal.vue'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
router
}
from
'@/router'
;
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
}
=
useMessage
();
const
go
=
useGo
();
const
route
=
useRoute
();
const
path
=
ref
(
''
);
const
layout
=
ref
(
'single'
);
const
jsonDataLeft
=
jsonData
;
const
jsonDataRight
=
jsonData
;
...
...
@@ -203,10 +216,27 @@
createMessage
.
success
(
'保存成功'
);
}
// 根据id获取文件路径
function
getPathById
(
id
)
{
console
.
log
(
id
);
const
node
=
DataTreeData
.
find
((
item
)
=>
''
+
item
.
businessId
===
id
);
console
.
log
(
node
);
if
(
!
node
)
return
''
;
// 如果找不到节点,则返回空字符串
// 如果是根节点,直接返回其名称
if
(
node
.
parentId
===
0
)
{
return
node
.
workSpaceName
;
}
// 递归获取父节点路径,并拼接当前节点名称
const
parentPath
=
getPathById
(
''
+
node
.
parentId
);
console
.
log
(
'parentPath'
,
parentPath
);
return
`
${
parentPath
}
/
${
node
.
workSpaceName
}
`
;
}
// 页面左侧点击返回链接时的操作
function
goBack
()
{
// 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
go
(
'/scriptDevelopment/shellDevelopment/index'
);
// // 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
// go('/scriptDevelopment/shellDevelopment/index');
router
.
back
();
}
//同步滚动
const
handleScroll
=
()
=>
{
...
...
@@ -229,6 +259,8 @@
}
});
onMounted
(
async
()
=>
{
console
.
log
(
111111111111
);
path
.
value
=
getPathById
(
route
.
query
.
id
);
await
nextTick
(()
=>
{
if
(
editorLeft
.
value
&&
editorRight
.
value
)
{
editorLeft
.
value
.
addEventListener
(
'scroll'
,
handleScroll
);
...
...
@@ -264,4 +296,11 @@
flex
:
1
;
overflow
:
hidden
;
}
:deep
(
.CodeMirror
)
{
height
:
700px
!important
;
}
:deep
(
.ant-page-header
)
{
padding
:
5px
!important
;
}
</
style
>
src/views/scriptDevelopment/shellDevelopment/sqlDevelopmentData.ts
View file @
f2102ca5
...
...
@@ -115,7 +115,7 @@ export const DataTreeData: any[] = [
delFlag
:
'0'
,
flag
:
'1'
,
businessId
:
302
,
workSpaceName
:
'SQL
1
'
,
workSpaceName
:
'SQL
2
'
,
parentId
:
202
,
code
:
'003'
,
ancestors
:
'0,100'
,
...
...
@@ -129,7 +129,7 @@ export const DataTreeData: any[] = [
delFlag
:
'0'
,
flag
:
'0'
,
businessId
:
303
,
workSpaceName
:
'SQL
1
'
,
workSpaceName
:
'SQL
3
'
,
parentId
:
203
,
code
:
'010'
,
ancestors
:
'0,100,107'
,
...
...
@@ -368,8 +368,8 @@ export const previewData: any[] = [
},
];
export
const
jsonData
=
`
#!/bin/bash
# 自动化任务伪代码示例:文件备份、日志清理和服务状态检查
#!/bin/bash
# 自动化任务伪代码示例:文件备份、日志清理和服务状态检查
# 定义变量
BACKUP_DIR="/backup" # 备份目录
...
...
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