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
71b59ac3
Commit
71b59ac3
authored
Dec 13, 2024
by
LiXuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
c7391d6a
57d1299a
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
332 additions
and
473 deletions
+332
-473
fileByApplyDetail.vue
...esourceDevelopment/file/fileByApply/fileByApplyDetail.vue
+26
-25
tempalte.data.ts
...riptDevelopment/shellDevelopment/addFile/tempalte.data.ts
+8
-7
templateModal.vue
...iptDevelopment/shellDevelopment/addFile/templateModal.vue
+1
-0
VersionCompare.vue
...elopment/shellDevelopment/shellExecute/VersionCompare.vue
+143
-144
VersionDetail.vue
...velopment/shellDevelopment/shellExecute/VersionDetail.vue
+121
-159
submitModal.vue
...hellDevelopment/shellExecute/handleSubmit/submitModal.vue
+6
-14
tempalte.data.ts
...ellDevelopment/shellExecute/handleSubmit/tempalte.data.ts
+3
-3
optionsModal.vue
...evelopment/shellDevelopment/shellExecute/optionsModal.vue
+1
-1
shellExecute.vue
...evelopment/shellDevelopment/shellExecute/shellExecute.vue
+12
-118
versionManagementModal.vue
.../shellDevelopment/shellExecute/versionManagementModal.vue
+11
-2
No files found.
src/views/mallResourceDevelopment/file/fileByApply/fileByApplyDetail.vue
View file @
71b59ac3
...
@@ -22,6 +22,12 @@
...
@@ -22,6 +22,12 @@
</div>
</div>
</
template
>
</
template
>
<div
style=
"display: flex"
>
<span
style=
"margin-top: 20px; margin-left: 10px; font-size: 18px; font-weight: bold"
>
基本信息
</span
>
</div>
<Description
<Description
size=
"middle"
size=
"middle"
title=
" "
title=
" "
...
@@ -29,13 +35,14 @@
...
@@ -29,13 +35,14 @@
:column=
"3"
:column=
"3"
:data=
"BasicInfoData"
:data=
"BasicInfoData"
:schema=
"BasicInfoSchema"
:schema=
"BasicInfoSchema"
>
/>
<
template
#
action
>
<div
style=
"display: flex"
>
<div
style=
"display: flex; flex-direction: column"
>
<span
style=
"font-size: 18px; font-weight: bold; margin-right: 1550px"
>
基本信息
</span>
<span
style=
"margin-top: 20px; margin-left: 10px; font-size: 18px; font-weight: bold"
</div>
>
管理属性
</span
</
template
>
>
</Description>
</div>
<Description
<Description
size=
"middle"
size=
"middle"
title=
" "
title=
" "
...
@@ -43,13 +50,13 @@
...
@@ -43,13 +50,13 @@
:column=
"3"
:column=
"3"
:data=
"ManagePropertyData"
:data=
"ManagePropertyData"
:schema=
"ManagePropertySchema"
:schema=
"ManagePropertySchema"
>
/
>
<
template
#
action
>
<div
style=
"display: flex"
>
<div
style=
"display: flex"
>
<span
style=
"font-size: 18px; font-weight: bold; margin-right: 1550px"
>
管理属性
</span>
<span
style=
"margin-top: 20px; margin-left: 10px; font-size: 18px; font-weight: bold"
</div>
>
权限信息
</span
</
template
>
>
</
Description
>
</
div
>
<Description
<Description
size=
"middle"
size=
"middle"
title=
" "
title=
" "
...
@@ -57,13 +64,7 @@
...
@@ -57,13 +64,7 @@
:column=
"3"
:column=
"3"
:data=
"permissionsData"
:data=
"permissionsData"
:schema=
"permissionsInfo"
:schema=
"permissionsInfo"
>
/>
<
template
#
action
>
<div
style=
"display: flex"
>
<span
style=
"font-size: 18px; font-weight: bold; margin-right: 1550px"
>
权限信息
</span>
</div>
</
template
>
</Description>
<div
class=
"mianBodyEditContainer"
>
<div
class=
"mianBodyEditContainer"
>
<Tabs
style=
"padding-left: 20px"
v-model:activeKey=
"page"
size=
"large"
>
<Tabs
style=
"padding-left: 20px"
v-model:activeKey=
"page"
size=
"large"
>
<a-tab-pane
key=
"1"
tab=
"采样数据"
>
<a-tab-pane
key=
"1"
tab=
"采样数据"
>
...
@@ -138,7 +139,7 @@
...
@@ -138,7 +139,7 @@
</template>
</template>
</BasicTable>
</BasicTable>
</div>
</div>
<span
style=
"
font-weight: bold; font-size: 16px; margin-left: 35px
"
>
推送记录
</span>
<span
style=
"
margin-left: 35px; font-size: 16px; font-weight: bold
"
>
推送记录
</span>
<div
class=
"flex"
>
<div
class=
"flex"
>
<div
style=
"width: 45%"
>
<div
style=
"width: 45%"
>
<BasicTable
@
register=
"registerPushTypeTable"
/>
<BasicTable
@
register=
"registerPushTypeTable"
/>
...
@@ -420,11 +421,11 @@
...
@@ -420,11 +421,11 @@
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.editor
{
.editor
{
background-color
:
white
;
height
:
560px
;
height
:
560px
;
border
:
1px
solid
#d9d9d9
;
padding
:
16px
;
margin-bottom
:
8px
;
margin-bottom
:
8px
;
padding
:
16px
;
border
:
1px
solid
#d9d9d9
;
background-color
:
white
;
}
}
.editor
textarea
{
.editor
textarea
{
...
...
src/views/scriptDevelopment/shellDevelopment/addFile/tempalte.data.ts
View file @
71b59ac3
...
@@ -162,7 +162,7 @@ export const formSchemaTemplate: any = [
...
@@ -162,7 +162,7 @@ export const formSchemaTemplate: any = [
field
:
'fileType'
,
field
:
'fileType'
,
label
:
'文件类型'
,
label
:
'文件类型'
,
component
:
'Input'
,
component
:
'Input'
,
defaultValue
:
'
.sh格式文件
'
,
defaultValue
:
'
Shell
'
,
colProps
:
{
span
:
8
},
colProps
:
{
span
:
8
},
componentProps
:
{
componentProps
:
{
readonly
:
true
,
readonly
:
true
,
...
@@ -190,14 +190,15 @@ export const formSchemaTemplate: any = [
...
@@ -190,14 +190,15 @@ export const formSchemaTemplate: any = [
{
{
field
:
'model'
,
field
:
'model'
,
label
:
'目录权属模式'
,
label
:
'目录权属模式'
,
component
:
'
RadioGroup
'
,
component
:
'
Input
'
,
defaultValue
:
'
本级
定义'
,
defaultValue
:
'
资源自
定义'
,
colProps
:
{
span
:
8
},
colProps
:
{
span
:
8
},
componentProps
:
{
componentProps
:
{
options
:
[
readonly
:
true
,
{
label
:
'本级定义'
,
value
:
'本级定义'
},
style
:
{
{
label
:
'资源自定义'
,
value
:
'资源自定义'
},
border
:
'none'
,
],
backgroundColor
:
'transparent'
,
},
},
},
},
},
{
{
...
...
src/views/scriptDevelopment/shellDevelopment/addFile/templateModal.vue
View file @
71b59ac3
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
//初始化表单
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
labelWidth
:
100
,
labelAlign
:
'left'
,
baseColProps
:
{
lg
:
24
,
md
:
24
},
baseColProps
:
{
lg
:
24
,
md
:
24
},
schemas
:
formSchemaTemplate
,
schemas
:
formSchemaTemplate
,
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
...
...
src/views/scriptDevelopment/shellDevelopment/shellExecute/VersionCompare.vue
View file @
71b59ac3
<
template
>
<
template
>
<PageWrapper
<PageWrapper
title=
""
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
title=
"shell文件版本对比"
<template
#
headerContent
>
dense
<div
style=
"width: 100%; display: flex; align-items: center; justify-content: space-between"
>
contentFullHeight
<div
style=
"display: flex; align-items: center"
>
fixedHeight
<Icon
contentClass=
"flex"
@
click=
"goBack"
@
back=
"goBack"
class=
"backBtn"
>
icon=
"eva:arrow-ios-back-fill"
<!--
<GroupTree
@
select=
"handleSelect"
class=
"w-1/4 xl:w-1/5"
/>
-->
:size=
"25"
<div
class=
"w-full xl:w-full"
style=
"padding-top: 20px"
>
color=
"grey"
<BasicForm
@
register=
"registerForm"
>
/>
<template
#
formFooter
>
<span
style=
"color: grey; margin-left: 10px"
>
{{
path
}}
</span>
<div
style=
"display: flex; justify-content: space-between; margin-left: 500px"
>
</div>
<!-- 新窗口运行-->
<div
style=
"display: flex; margin-left: 500px"
>
<!--
<Tooltip
placement=
"top"
title=
"新窗口运行"
>
<!-- 提交版本-->
<a-button
<Tooltip
placement=
"top"
title=
"提交版本"
>
type=
"primary"
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSubmit"
>
style=
"margin-right: 10px; margin-left: 500px"
提交版本
@
click=
"handleExecute"
<!--
<Icon
icon=
"majesticons:cloud-upload-line"
:size=
"20"
/>
-->
>
</a-button>
<Icon
icon=
"si:play-forward-duotone"
:size=
"20"
/>
</Tooltip>
</a-button>
<!-- 版本管理-->
</Tooltip>
-->
<Tooltip
placement=
"top"
title=
"版本管理"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleVersion"
>
<!-- 运行-->
版本管理
<!--
<Tooltip
placement=
"top"
title=
"运行"
>
<!--
<Icon
icon=
"majesticons:file-search-line"
:size=
"20"
/>
-->
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleExecute"
>
</a-button>
<Icon
icon=
"si:play-line"
:size=
"20"
/>
</Tooltip>
</a-button>
<!-- 参数配置-->
</Tooltip>
-->
<Tooltip
placement=
"top"
title=
"参数配置"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleOptions"
>
<!-- 执行记录-->
参数配置
<!--
<Tooltip
placement=
"top"
title=
"执行记录"
>
<!--
<Icon
icon=
"majesticons:link-circle-line"
:size=
"20"
/>
-->
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleRecord"
>
</a-button>
<Icon
icon=
"si:clock-alt-line"
:size=
"20"
/>
</Tooltip>
</a-button>
<!-- 保存-->
</Tooltip>
-->
<Tooltip
placement=
"top"
title=
"保存"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSave"
>
<!-- 提交版本-->
保存
<!--
<Tooltip
placement=
"top"
title=
"提交版本"
>
<!--
<Icon
icon=
"majesticons:save-line"
:size=
"20"
/>
-->
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSubmit"
>
</a-button>
<Icon
icon=
"majesticons:cloud-upload-line"
:size=
"20"
/>
</Tooltip>
</a-button>
</div>
</Tooltip>
-->
</div>
</
template
>
<!-- 版本管理-->
<div
class=
"w-full"
style=
"background-color: white"
>
<!--
<Tooltip
placement=
"top"
title=
"版本管理"
>
<div
style=
"display: flex"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleVersion"
>
<div
style=
"flex: 1"
>
<Icon
icon=
"majesticons:file-search-line"
:size=
"20"
/>
<div
style=
"display: flex; justify-content: space-between; margin-top: 10px"
>
</a-button>
<div
style=
"display: flex; gap: 10px; align-items: center"
>
</Tooltip>
-->
<span
style=
"color: grey; margin-left: 10px"
>
选择版本:
</span>
<Select
<!-- 参数配置-->
v-model:value=
"optionValue"
<Tooltip
placement=
"top"
title=
"参数配置"
>
placeholder=
"请选择版本"
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleOptions"
>
:options=
"options"
<Icon
icon=
"majesticons:link-circle-line"
:size=
"20"
/>
@
change=
"handleChange"
</a-button>
/>
</Tooltip>
</div>
<div
style=
"display: flex"
>
<!-- 格式化-->
<!-- 参数配置-->
<!--
<Tooltip
placement=
"top"
title=
"格式化"
>
<Tooltip
placement=
"top"
title=
"参数配置"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleChange"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleOptions"
>
<Icon
icon=
"gg:align-left"
:size=
"20"
/>
参数配置
</a-button>
<!-- <Icon icon="majesticons:link-circle-line" :size="20" />-->
</Tooltip>
-->
</a-button>
<!-- 回退至该版本-->
</Tooltip>
<Tooltip
placement=
"top"
title=
"回退至该版本"
>
<!-- 回退至该版本-->
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleRollback"
>
<Tooltip
placement=
"top"
title=
"回退至该版本"
>
<Icon
icon=
"ant-design:rollback-outlined"
:size=
"20"
/>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleRollback"
>
</a-button>
回退至该版本
</Tooltip>
<!-- <Icon icon="ant-design:rollback-outlined" :size="20" />-->
<!-- 退出查看-->
</a-button>
<Tooltip
placement=
"top"
title=
"退出查看"
>
</Tooltip>
<a-button
type=
"error"
style=
"margin-right: 10px"
@
click=
"handleExit"
>
<!-- 退出查看-->
<Icon
icon=
"majesticons:save-line"
:size=
"20"
/>
<Tooltip
placement=
"top"
title=
"退出查看"
>
</a-button>
<a-button
type=
"error"
style=
"margin-right: 10px"
@
click=
"handleExit"
>
</Tooltip>
退出查看
<!-- 保存-->
<!-- <Icon icon="majesticons:save-line" :size="20" />-->
<!--
<Tooltip
placement=
"top"
title=
"保存"
>
</a-button>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSave"
>
</Tooltip>
<Icon
icon=
"majesticons:save-line"
:size=
"20"
/>
</div>
</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
>
<CodeEditor
v-model:value=
"jsonDataLeft"
:mode=
"MODE.SHELL"
/>
</BasicForm>
</div>
<div
style=
"width: 100%; margin-top: 20px"
>
<div
style=
"flex: 1"
>
<div
class=
"editor-container"
>
<div
style=
"display: flex; justify-content: space-between; margin-top: 10px"
>
<div
class=
"editor-wrapper"
style=
"height: 600px"
>
<div
style=
"display: flex; gap: 10px; align-items: center"
>
<div
<span
style=
"margin-left: 10px"
>
当前版本:
</span>
class=
"editor-left"
ref=
"editorLeft"
style=
"flex: 1; width: 50%; overflow: hidden"
:scrollbar=
"false"
>
<CodeEditor
v-model:value=
"jsonDataLeft"
:mode=
"MODE.JSON"
/>
</div>
</div>
<div
<div
style=
"display: flex; justify-content: space-between; margin-left: 500px"
>
class=
"editor-right"
<!-- 参数配置-->
ref=
"editorRight"
<Tooltip
placement=
"top"
title=
"参数配置"
>
style=
"flex: 1; width: 50%; overflow: hidden"
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleOptions"
>
:scrollbar=
"false"
参数配置
>
<!-- <Icon icon="majesticons:link-circle-line" :size="20" />-->
<CodeEditor
v-model:value=
"jsonDataRight"
:mode=
"MODE.JSON"
/>
</a-button>
</Tooltip>
</div>
</div>
</div>
</div>
<CodeEditor
v-model:value=
"jsonDataRight"
:mode=
"MODE.SHELL"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -125,11 +111,11 @@
...
@@ -125,11 +111,11 @@
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
Modal
,
Tooltip
}
from
'ant-design-vue'
;
import
{
Modal
,
Tooltip
,
Select
}
from
'ant-design-vue'
;
import
{
onMounted
,
ref
,
nextTick
,
watch
}
from
'vue'
;
import
{
onMounted
,
ref
,
nextTick
,
watch
}
from
'vue'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
GroupTree
from
'../GroupTree.vue'
;
import
GroupTree
from
'../GroupTree.vue'
;
import
{
jsonData
}
from
'../sqlDevelopmentData'
;
import
{
DataTreeData
,
jsonData
}
from
'../sqlDevelopmentData'
;
import
{
CompareFormSchema
}
from
'../data'
;
import
{
CompareFormSchema
}
from
'../data'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
CodeEditor
,
MODE
}
from
'@/components/CodeEditor'
;
import
{
CodeEditor
,
MODE
}
from
'@/components/CodeEditor'
;
...
@@ -145,12 +131,15 @@
...
@@ -145,12 +131,15 @@
import
{
schema
}
from
'@/views/dataIntegration/taskOM/taskOM.data'
;
import
{
schema
}
from
'@/views/dataIntegration/taskOM/taskOM.data'
;
import
versionManagementModal
from
'./versionManagementModal.vue'
;
import
versionManagementModal
from
'./versionManagementModal.vue'
;
import
{
router
}
from
'@/router'
;
import
{
router
}
from
'@/router'
;
import
{
useRoute
}
from
'vue-router'
;
defineOptions
({
name
:
'AccountManagement'
});
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
go
=
useGo
();
const
go
=
useGo
();
const
route
=
useRoute
();
const
layout
=
ref
(
'single'
);
const
layout
=
ref
(
'single'
);
const
path
=
ref
();
const
jsonDataLeft
=
jsonData
;
const
jsonDataLeft
=
jsonData
;
const
jsonDataRight
=
jsonData
;
const
jsonDataRight
=
jsonData
;
const
editorLeft
=
ref
<
HTMLElement
|
null
>
(
null
);
const
editorLeft
=
ref
<
HTMLElement
|
null
>
(
null
);
...
@@ -158,6 +147,17 @@
...
@@ -158,6 +147,17 @@
const
toggleLayout
=
()
=>
{
const
toggleLayout
=
()
=>
{
layout
.
value
=
layout
.
value
===
'single'
?
'double'
:
'single'
;
layout
.
value
=
layout
.
value
===
'single'
?
'double'
:
'single'
;
};
};
const
optionValue
=
ref
(
'V1 2022/01/01 12:24:22'
);
const
options
=
ref
([
{
label
:
'V1 2022/01/01 12:24:22'
,
value
:
'V1 2022/01/01 12:24:22'
,
},
{
label
:
'V2 2022/01/02 13:30:00'
,
value
:
'V2 2022/01/02 13:30:00'
,
},
]);
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerSubmitModal
,
{
openModal
:
openSubmitModal
}]
=
useModal
();
const
[
registerSubmitModal
,
{
openModal
:
openSubmitModal
}]
=
useModal
();
const
[
registerResultModal
,
{
openModal
:
openResultModal
}]
=
useModal
();
const
[
registerResultModal
,
{
openModal
:
openResultModal
}]
=
useModal
();
...
@@ -214,16 +214,19 @@
...
@@ -214,16 +214,19 @@
//回退至该版本按钮
//回退至该版本按钮
function
handleRollback
()
{
function
handleRollback
()
{
createMessage
.
success
(
'回退成功'
);
createMessage
.
success
(
'回退成功'
);
router
.
push
(
'/scriptDevelopment/shellDevelopment/shellExecute/shellExecute'
);
router
.
push
({
path
:
'/scriptDevelopment/shellDevelopment/shellExecute/shellExecute'
,
query
:
{
id
:
route
.
query
.
id
,
},
});
}
}
//退出查看按钮
//退出查看按钮
function
handleExit
()
{
function
handleExit
()
{
Modal
.
confirm
({
router
.
push
({
iconType
:
'warning'
,
path
:
'/scriptDevelopment/shellDevelopment/shellExecute/shellExecute'
,
title
:
'提示'
,
query
:
{
content
:
'是否退出查看?'
,
id
:
route
.
query
.
id
,
onOk
()
{
router
.
push
(
'/scriptDevelopment/shellDevelopment/shellExecute/shellExecute'
);
},
},
});
});
}
}
...
@@ -253,7 +256,23 @@
...
@@ -253,7 +256,23 @@
}
}
}
}
});
});
// 根据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
}
`
;
}
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
path
.
value
=
getPathById
(
route
.
query
.
id
);
await
nextTick
(()
=>
{
await
nextTick
(()
=>
{
if
(
editorLeft
.
value
&&
editorRight
.
value
)
{
if
(
editorLeft
.
value
&&
editorRight
.
value
)
{
editorLeft
.
value
.
addEventListener
(
'scroll'
,
handleScroll
);
editorLeft
.
value
.
addEventListener
(
'scroll'
,
handleScroll
);
...
@@ -262,31 +281,11 @@
...
@@ -262,31 +281,11 @@
});
});
});
});
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"less"
scoped
>
.editor-container
{
:deep(.CodeMirror) {
display
:
flex
;
height: 700px !important;
}
.editor-left
{
flex
:
1
;
height
:
100%
;
overflow-y
:
hidden
;
}
}
:deep(.ant-page-header) {
.editor-right
{
padding: 5px !important;
flex
:
1
;
height
:
100%
;
overflow-y
:
hidden
;
}
.editor-wrapper
{
display
:
flex
;
justify-content
:
space-between
;
}
.editor-left
,
.editor-right
{
flex
:
1
;
overflow
:
hidden
;
}
}
</
style
>
</
style
>
src/views/scriptDevelopment/shellDevelopment/shellExecute/VersionDetail.vue
View file @
71b59ac3
<
template
>
<
template
>
<PageWrapper
<PageWrapper
title=
""
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
title=
"shell文件查看详情"
<template
#
headerContent
>
dense
<div
style=
"width: 100%; display: flex; align-items: center; justify-content: space-between"
>
contentFullHeight
<div
style=
"display: flex; align-items: center"
>
fixedHeight
<span
style=
"color: grey; margin-left: 10px"
>
{{
path
}}
</span>
contentClass=
"flex"
</div>
@
back=
"goBack"
<div
style=
"display: flex; margin-left: 500px"
>
>
<!-- 提交版本-->
<!--
<GroupTree
@
select=
"handleSelect"
class=
"w-1/4 xl:w-1/5"
/>
-->
<Tooltip
placement=
"top"
title=
"提交版本"
>
<div
class=
"w-full xl:w-full"
style=
"padding-top: 20px"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
>
提交版本
<template
#
formFooter
>
<!--
<Icon
icon=
"majesticons:cloud-upload-line"
:size=
"20"
/>
-->
<div
style=
"display: flex; justify-content: space-between; margin-left: 500px"
>
</a-button>
<!-- 新窗口运行-->
</Tooltip>
<!--
<Tooltip
placement=
"top"
title=
"新窗口运行"
>
<!-- 版本管理-->
<a-button
<Tooltip
placement=
"top"
title=
"版本管理"
>
type=
"primary"
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleVersion"
>
style=
"margin-right: 10px; margin-left: 500px"
版本管理
@
click=
"handleExecute"
<!--
<Icon
icon=
"majesticons:file-search-line"
:size=
"20"
/>
-->
>
</a-button>
<Icon
icon=
"si:play-forward-duotone"
:size=
"20"
/>
</Tooltip>
</a-button>
<!-- 参数配置-->
</Tooltip>
-->
<Tooltip
placement=
"top"
title=
"参数配置"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleOptions"
>
<!-- 运行-->
参数配置
<!--
<Tooltip
placement=
"top"
title=
"运行"
>
<!--
<Icon
icon=
"majesticons:link-circle-line"
:size=
"20"
/>
-->
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleExecute"
>
</a-button>
<Icon
icon=
"si:play-line"
:size=
"20"
/>
</Tooltip>
</a-button>
<!-- 保存-->
</Tooltip>
-->
<Tooltip
placement=
"top"
title=
"保存"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSave"
>
<!-- 执行记录-->
保存
<!--
<Tooltip
placement=
"top"
title=
"执行记录"
>
<!--
<Icon
icon=
"majesticons:save-line"
:size=
"20"
/>
-->
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleRecord"
>
</a-button>
<Icon
icon=
"si:clock-alt-line"
:size=
"20"
/>
</Tooltip>
</a-button>
</div>
</Tooltip>
-->
</div>
<div
style=
"display: flex; justify-content: space-between; margin-top: 10px"
>
<!-- 提交版本-->
<div
style=
"display: flex; gap: 10px; align-items: center"
>
<!--
<Tooltip
placement=
"top"
title=
"提交版本"
>
<span
style=
"color: grey; margin-left: 10px"
>
选择版本:
</span>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSubmit"
>
<Select
<Icon
icon=
"majesticons:cloud-upload-line"
:size=
"20"
/>
v-model:value=
"optionValue"
</a-button>
placeholder=
"请选择版本"
</Tooltip>
-->
:options=
"options"
@
change=
"handleChange"
<!-- 版本管理-->
/>
<!--
<Tooltip
placement=
"top"
title=
"版本管理"
>
</div>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleVersion"
>
<div>
<Icon
icon=
"majesticons:file-search-line"
:size=
"20"
/>
<Tooltip
placement=
"top"
title=
"回退至该版本"
>
</a-button>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleBackToCurrent"
>
</Tooltip>
-->
<Icon
icon=
"ri:arrow-go-back-fill"
:size=
"20"
/>
回退至该版本
<!-- 参数配置-->
</a-button>
<!--
<Tooltip
placement=
"top"
title=
"参数配置"
>
</Tooltip>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleOptions"
>
<Tooltip
placement=
"top"
title=
"退出查看"
>
<Icon
icon=
"majesticons:link-circle-line"
:size=
"20"
/>
<a-button
type=
"error"
style=
"margin-right: 10px"
@
click=
"handleExit"
>
</a-button>
退出查看
</Tooltip>
-->
<!--
<Icon
icon=
"majesticons:backspace-line"
:size=
"20"
/>
-->
</a-button>
<!-- 格式化-->
</Tooltip>
<!--
<Tooltip
placement=
"top"
title=
"格式化"
>
</div>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleChange"
>
</div>
<Icon
icon=
"gg:align-left"
:size=
"20"
/>
</
template
>
</a-button>
<div
class=
"w-full xl:w-full"
style=
"background-color: white"
>
</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>
-->
<Tooltip
placement=
"top"
title=
"退出查看"
>
<a-button
type=
"error"
style=
"margin-right: 10px"
@
click=
"handleExit"
>
<Icon
icon=
"majesticons:backspace-line"
:size=
"20"
/>
</a-button>
</Tooltip>
</div>
</
template
>
</BasicForm>
<div
style=
"width: 100%; margin-top: 20px"
>
<div
style=
"width: 100%; margin-top: 20px"
>
<div
class=
"editor-container"
>
<div
class=
"codeEditorH"
style=
"padding: 0 15px"
v-if=
"layout === 'single'"
>
<div>
<CodeEditor
v-model:value=
"jsonData"
:mode=
"MODE.SHELL"
/>
<CodeEditor
v-model:value=
"jsonData"
:mode=
"MODE.JSON"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<OptionsModal
@
register=
"registerModal"
/>
<optionsModal
@
register=
"registerModal"
/>
<resultModal
@
register=
"registerResultModal"
/>
<resultModal
@
register=
"registerResultModal"
/>
<PreviewModal
@
register=
"registerPreviewModal"
/>
<PreviewModal
@
register=
"registerPreviewModal"
/>
<RecordModal
@
register=
"registerRecordModal"
/>
<RecordModal
@
register=
"registerRecordModal"
/>
...
@@ -105,16 +78,16 @@
...
@@ -105,16 +78,16 @@
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
Modal
,
Tooltip
}
from
'ant-design-vue'
;
import
{
Modal
,
Tooltip
,
Select
}
from
'ant-design-vue'
;
import
{
onMounted
,
ref
,
nextTick
,
watch
}
from
'vue'
;
import
{
onMounted
,
ref
,
nextTick
,
watch
}
from
'vue'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
GroupTree
from
'../GroupTree.vue'
;
import
GroupTree
from
'../GroupTree.vue'
;
import
{
jsonData
}
from
'../sqlDevelopmentData'
;
import
{
DataTreeData
,
jsonData
}
from
'../sqlDevelopmentData'
;
import
{
CompareFormSchema
}
from
'../data'
;
import
{
CompareFormSchema
}
from
'../data'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
useGo
}
from
'@/hooks/web/usePage'
;
import
{
CodeEditor
,
MODE
}
from
'@/components/CodeEditor'
;
import
{
CodeEditor
,
MODE
}
from
'@/components/CodeEditor'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
o
ptionsModal
from
'./optionsModal.vue'
;
import
O
ptionsModal
from
'./optionsModal.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
resultModal
from
'./resultModal.vue'
;
import
resultModal
from
'./resultModal.vue'
;
import
PreviewModal
from
'./dataPreviewModal.vue'
;
import
PreviewModal
from
'./dataPreviewModal.vue'
;
...
@@ -125,14 +98,26 @@
...
@@ -125,14 +98,26 @@
import
{
schema
}
from
'@/views/dataIntegration/taskOM/taskOM.data'
;
import
{
schema
}
from
'@/views/dataIntegration/taskOM/taskOM.data'
;
import
versionManagementModal
from
'./versionManagementModal.vue'
;
import
versionManagementModal
from
'./versionManagementModal.vue'
;
import
{
router
}
from
'@/router'
;
import
{
router
}
from
'@/router'
;
import
{
useRoute
}
from
'vue-router'
;
defineOptions
({
name
:
'AccountManagement'
});
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
go
=
useGo
();
const
go
=
useGo
();
const
path
=
ref
(
''
);
const
optionValue
=
ref
(
'V1 2022/01/01 12:24:22'
);
const
options
=
ref
([
{
label
:
'V1 2022/01/01 12:24:22'
,
value
:
'V1 2022/01/01 12:24:22'
,
},
{
label
:
'V2 2022/01/02 13:30:00'
,
value
:
'V2 2022/01/02 13:30:00'
,
},
]);
const
layout
=
ref
(
'single'
);
const
layout
=
ref
(
'single'
);
const
jsonDataLeft
=
jsonData
;
const
route
=
useRoute
();
const
jsonDataRight
=
jsonData
;
const
editorLeft
=
ref
<
HTMLElement
|
null
>
(
null
);
const
editorLeft
=
ref
<
HTMLElement
|
null
>
(
null
);
const
editorRight
=
ref
<
HTMLElement
|
null
>
(
null
);
const
editorRight
=
ref
<
HTMLElement
|
null
>
(
null
);
const
toggleLayout
=
()
=>
{
const
toggleLayout
=
()
=>
{
...
@@ -144,34 +129,23 @@
...
@@ -144,34 +129,23 @@
const
[
registerPreviewModal
,
{
openModal
:
openPreviewModal
}]
=
useModal
();
const
[
registerPreviewModal
,
{
openModal
:
openPreviewModal
}]
=
useModal
();
const
[
registerVersionManagementModal
,
{
openModal
:
openVersionManagementModal
}]
=
useModal
();
const
[
registerVersionManagementModal
,
{
openModal
:
openVersionManagementModal
}]
=
useModal
();
const
[
registerRecordModal
,
{
openModal
:
openRecordModal
}]
=
useModal
();
const
[
registerRecordModal
,
{
openModal
:
openRecordModal
}]
=
useModal
();
const
[
registerForm
]
=
useForm
({
labelWidth
:
100
,
// 根据id获取文件路径
baseColProps
:
{
lg
:
6
,
md
:
4
},
function
getPathById
(
id
)
{
schemas
:
CompareFormSchema
,
console
.
log
(
id
);
showActionButtonGroup
:
false
,
const
node
=
DataTreeData
.
find
((
item
)
=>
''
+
item
.
businessId
===
id
);
disabled
:
true
,
console
.
log
(
node
);
});
if
(
!
node
)
return
''
;
// 如果找不到节点,则返回空字符串
/** 部门树的select*/
// 如果是根节点,直接返回其名称
function
handleSelect
()
{
if
(
node
.
parentId
===
0
)
{
openPreviewModal
(
true
,
{
return
node
.
workSpaceName
;
title
:
'数据预览'
,
}
});
// 递归获取父节点路径,并拼接当前节点名称
}
const
parentPath
=
getPathById
(
''
+
node
.
parentId
);
function
handleOptions
()
{
console
.
log
(
'parentPath'
,
parentPath
);
openModal
(
true
,
{
return
`
${
parentPath
}
/
${
node
.
workSpaceName
}
`
;
title
:
'参数配置'
,
});
}
function
handleExecute
()
{
openResultModal
(
true
,
{
title
:
'执行结果'
,
});
}
function
handleRecord
()
{
openRecordModal
(
true
,
{
title
:
'执行记录'
,
});
}
}
//提交版本按钮
//提交版本按钮
function
handleSubmit
()
{
function
handleSubmit
()
{
openSubmitModal
(
true
,
{
openSubmitModal
(
true
,
{
...
@@ -183,6 +157,12 @@
...
@@ -183,6 +157,12 @@
function
handleVersion
()
{
function
handleVersion
()
{
openVersionManagementModal
(
true
,
{
openVersionManagementModal
(
true
,
{
title
:
'版本管理'
,
title
:
'版本管理'
,
id
:
route
.
query
.
id
,
});
}
function
handleOptions
()
{
openModal
(
true
,
{
title
:
'参数配置'
,
});
});
}
}
function
handleChange
()
{
function
handleChange
()
{
...
@@ -194,19 +174,20 @@
...
@@ -194,19 +174,20 @@
}
}
//退出查看按钮
//退出查看按钮
function
handleExit
()
{
function
handleExit
()
{
Modal
.
confirm
({
router
.
back
();
iconType
:
'warning'
,
}
title
:
'提示'
,
//退出查看按钮
content
:
'是否退出查看?'
,
function
handleBackToCurrent
()
{
onOk
()
{
router
.
push
({
router
.
push
(
'/scriptDevelopment/shellDevelopment/shellExecute/shellExecute'
);
path
:
'/scriptDevelopment/shellDevelopment/shellExecute/shellExecute'
,
query
:
{
id
:
route
.
query
.
id
,
},
},
});
});
}
}
// 页面左侧点击返回链接时的操作
// 页面左侧点击返回链接时的操作
function
goBack
()
{
function
goBack
()
{
// 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
router
.
back
();
go
(
'/scriptDevelopment/shellDevelopment/index'
);
}
}
//同步滚动
//同步滚动
const
handleScroll
=
()
=>
{
const
handleScroll
=
()
=>
{
...
@@ -229,6 +210,7 @@
...
@@ -229,6 +210,7 @@
}
}
});
});
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
path
.
value
=
getPathById
(
route
.
query
.
id
);
await
nextTick
(()
=>
{
await
nextTick
(()
=>
{
if
(
editorLeft
.
value
&&
editorRight
.
value
)
{
if
(
editorLeft
.
value
&&
editorRight
.
value
)
{
editorLeft
.
value
.
addEventListener
(
'scroll'
,
handleScroll
);
editorLeft
.
value
.
addEventListener
(
'scroll'
,
handleScroll
);
...
@@ -237,31 +219,11 @@
...
@@ -237,31 +219,11 @@
});
});
});
});
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"less"
scoped
>
.editor-container
{
:deep(.CodeMirror) {
display
:
flex
;
height: 700px !important;
}
.editor-left
{
flex
:
1
;
height
:
100%
;
overflow-y
:
hidden
;
}
}
:deep(.ant-page-header) {
.editor-right
{
padding: 5px !important;
flex
:
1
;
height
:
100%
;
overflow-y
:
hidden
;
}
.editor-wrapper
{
display
:
flex
;
justify-content
:
space-between
;
}
.editor-left
,
.editor-right
{
flex
:
1
;
overflow
:
hidden
;
}
}
</
style
>
</
style
>
src/views/scriptDevelopment/shellDevelopment/shellExecute/handleSubmit/submitModal.vue
View file @
71b59ac3
...
@@ -47,16 +47,6 @@
...
@@ -47,16 +47,6 @@
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
resetFields
();
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
isMove
.
value
=
!!
data
?.
isMove
;
if
(
unref
(
isUpdate
))
{
// 获取行数据的id
rowId
.
value
=
data
.
record
.
businessId
;
// 塞值
setFieldsValue
({
...
data
.
record
,
});
}
});
});
// onMounted(){}
// onMounted(){}
...
@@ -66,11 +56,13 @@
...
@@ -66,11 +56,13 @@
/**确定按钮*/
/**确定按钮*/
async
function
handleSubmit
()
{
async
function
handleSubmit
()
{
if
(
textareaValue
.
value
.
trim
()
==
''
)
{
try
{
closeModal
();
setModalProps
({
confirmLoading
:
true
});
await
validate
();
emit
(
'success'
,
textareaValue
.
value
);
emit
(
'success'
,
textareaValue
.
value
);
}
else
{
closeModal
();
createMessage
.
error
(
'请填写内容'
);
}
finally
{
setModalProps
({
confirmLoading
:
false
});
}
}
}
}
</
script
>
</
script
>
src/views/scriptDevelopment/shellDevelopment/shellExecute/handleSubmit/tempalte.data.ts
View file @
71b59ac3
...
@@ -212,14 +212,14 @@ export const formSchemaTemplate: any = [
...
@@ -212,14 +212,14 @@ export const formSchemaTemplate: any = [
},
},
},
},
];
];
export
const
importFormSchema
:
any
[]
=
[
export
const
importFormSchema
:
FormSchema
[]
=
[
{
{
field
:
'importVersionAlert'
,
field
:
'importVersionAlert'
,
label
:
'版本描述'
,
label
:
'版本描述'
,
slot
:
'fileMethods'
,
component
:
'InputTextArea'
,
component
:
'InputTextarea'
,
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
componentProps
:
{
rows
:
8
,
placeholder
:
'最多255个字符'
,
placeholder
:
'最多255个字符'
,
},
},
required
:
true
,
required
:
true
,
...
...
src/views/scriptDevelopment/shellDevelopment/shellExecute/optionsModal.vue
View file @
71b59ac3
<
template
>
<
template
>
<BasicModal
<BasicModal
width=
"
30
%"
width=
"
41
%"
v-bind=
"$attrs"
v-bind=
"$attrs"
@
register=
"registerModal"
@
register=
"registerModal"
:title=
"title"
:title=
"title"
...
...
src/views/scriptDevelopment/shellDevelopment/shellExecute/shellExecute.vue
View file @
71b59ac3
...
@@ -14,31 +14,6 @@
...
@@ -14,31 +14,6 @@
<span
style=
"color: grey; margin-left: 10px"
>
{{
path
}}
</span>
<span
style=
"color: grey; margin-left: 10px"
>
{{
path
}}
</span>
</div>
</div>
<div
style=
"display: flex; margin-left: 500px"
>
<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=
"handleRecord"
>
<Icon
icon=
"si:clock-alt-line"
:size=
"20"
/>
</a-button>
</Tooltip>
-->
<!-- 提交版本-->
<!-- 提交版本-->
<Tooltip
placement=
"top"
title=
"提交版本"
>
<Tooltip
placement=
"top"
title=
"提交版本"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSubmit"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSubmit"
>
...
@@ -46,7 +21,6 @@
...
@@ -46,7 +21,6 @@
<!--
<Icon
icon=
"majesticons:cloud-upload-line"
:size=
"20"
/>
-->
<!--
<Icon
icon=
"majesticons:cloud-upload-line"
:size=
"20"
/>
-->
</a-button>
</a-button>
</Tooltip>
</Tooltip>
<!-- 版本管理-->
<!-- 版本管理-->
<Tooltip
placement=
"top"
title=
"版本管理"
>
<Tooltip
placement=
"top"
title=
"版本管理"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleVersion"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleVersion"
>
...
@@ -54,7 +28,6 @@
...
@@ -54,7 +28,6 @@
<!--
<Icon
icon=
"majesticons:file-search-line"
:size=
"20"
/>
-->
<!--
<Icon
icon=
"majesticons:file-search-line"
:size=
"20"
/>
-->
</a-button>
</a-button>
</Tooltip>
</Tooltip>
<!-- 参数配置-->
<!-- 参数配置-->
<Tooltip
placement=
"top"
title=
"参数配置"
>
<Tooltip
placement=
"top"
title=
"参数配置"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleOptions"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleOptions"
>
...
@@ -62,15 +35,6 @@
...
@@ -62,15 +35,6 @@
<!--
<Icon
icon=
"majesticons:link-circle-line"
:size=
"20"
/>
-->
<!--
<Icon
icon=
"majesticons:link-circle-line"
:size=
"20"
/>
-->
</a-button>
</a-button>
</Tooltip>
</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=
"保存"
>
<Tooltip
placement=
"top"
title=
"保存"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSave"
>
<a-button
type=
"primary"
style=
"margin-right: 10px"
@
click=
"handleSave"
>
...
@@ -78,15 +42,6 @@
...
@@ -78,15 +42,6 @@
<!--
<Icon
icon=
"majesticons:save-line"
:size=
"20"
/>
-->
<!--
<Icon
icon=
"majesticons:save-line"
:size=
"20"
/>
-->
</a-button>
</a-button>
</Tooltip>
</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>
</div>
</div>
</
template
>
</
template
>
...
@@ -95,33 +50,11 @@
...
@@ -95,33 +50,11 @@
<div
class=
"codeEditorH"
style=
"padding: 0 15px"
v-if=
"layout === 'single'"
>
<div
class=
"codeEditorH"
style=
"padding: 0 15px"
v-if=
"layout === 'single'"
>
<CodeEditor
v-model:value=
"jsonData"
:mode=
"MODE.SHELL"
/>
<CodeEditor
v-model:value=
"jsonData"
:mode=
"MODE.SHELL"
/>
</div>
</div>
<div
v-else
class=
"editor-container"
>
<div
class=
"editor-wrapper"
style=
"height: 600px"
>
<div
class=
"editor-left"
ref=
"editorLeft"
style=
"flex: 1; width: 50%; overflow: hidden"
:scrollbar=
"false"
>
<CodeEditor
v-model:value=
"jsonDataLeft"
:mode=
"MODE.JSON"
/>
</div>
<div
class=
"editor-right"
ref=
"editorRight"
style=
"flex: 1; width: 50%; overflow: hidden"
:scrollbar=
"false"
>
<CodeEditor
v-model:value=
"jsonDataRight"
:mode=
"MODE.JSON"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<OptionsModal
@
register=
"registerModal"
/>
<OptionsModal
@
register=
"registerModal"
/>
<ResultModal
@
register=
"registerResultModal"
/>
<PreviewModal
@
register=
"registerPreviewModal"
/>
<PreviewModal
@
register=
"registerPreviewModal"
/>
<RecordModal
@
register=
"registerRecordModal"
/>
<SubmitModal
@
register=
"registerSubmitModal"
@
success=
"handleSuccess"
/>
<SubmitModal
@
register=
"registerSubmitModal"
/>
<VersionManagementModal
@
register=
"registerVersionManagementModal"
/>
<VersionManagementModal
@
register=
"registerVersionManagementModal"
/>
</PageWrapper>
</PageWrapper>
</template>
</template>
...
@@ -155,8 +88,6 @@
...
@@ -155,8 +88,6 @@
const
route
=
useRoute
();
const
route
=
useRoute
();
const
path
=
ref
(
''
);
const
path
=
ref
(
''
);
const
layout
=
ref
(
'single'
);
const
layout
=
ref
(
'single'
);
const
jsonDataLeft
=
jsonData
;
const
jsonDataRight
=
jsonData
;
const
editorLeft
=
ref
<
HTMLElement
|
null
>
(
null
);
const
editorLeft
=
ref
<
HTMLElement
|
null
>
(
null
);
const
editorRight
=
ref
<
HTMLElement
|
null
>
(
null
);
const
editorRight
=
ref
<
HTMLElement
|
null
>
(
null
);
const
toggleLayout
=
()
=>
{
const
toggleLayout
=
()
=>
{
...
@@ -164,16 +95,9 @@
...
@@ -164,16 +95,9 @@
};
};
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerSubmitModal
,
{
openModal
:
openSubmitModal
}]
=
useModal
();
const
[
registerSubmitModal
,
{
openModal
:
openSubmitModal
}]
=
useModal
();
const
[
registerResultModal
,
{
openModal
:
openResultModal
}]
=
useModal
();
const
[
registerPreviewModal
,
{
openModal
:
openPreviewModal
}]
=
useModal
();
const
[
registerPreviewModal
,
{
openModal
:
openPreviewModal
}]
=
useModal
();
const
[
registerVersionManagementModal
,
{
openModal
:
openVersionManagementModal
}]
=
useModal
();
const
[
registerVersionManagementModal
,
{
openModal
:
openVersionManagementModal
}]
=
useModal
();
const
[
registerRecordModal
,
{
openModal
:
openRecordModal
}]
=
useModal
();
const
[
registerForm
]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
6
,
md
:
4
},
schemas
:
formSchema
,
showActionButtonGroup
:
false
,
});
/** 部门树的select*/
/** 部门树的select*/
function
handleSelect
()
{
function
handleSelect
()
{
openPreviewModal
(
true
,
{
openPreviewModal
(
true
,
{
...
@@ -185,16 +109,7 @@
...
@@ -185,16 +109,7 @@
title
:
'参数配置'
,
title
:
'参数配置'
,
});
});
}
}
function
handleExecute
()
{
openResultModal
(
true
,
{
title
:
'执行结果'
,
});
}
function
handleRecord
()
{
openRecordModal
(
true
,
{
title
:
'执行记录'
,
});
}
//提交版本按钮
//提交版本按钮
function
handleSubmit
()
{
function
handleSubmit
()
{
openSubmitModal
(
true
,
{
openSubmitModal
(
true
,
{
...
@@ -206,11 +121,15 @@
...
@@ -206,11 +121,15 @@
function
handleVersion
()
{
function
handleVersion
()
{
openVersionManagementModal
(
true
,
{
openVersionManagementModal
(
true
,
{
title
:
'版本管理'
,
title
:
'版本管理'
,
id
:
route
.
query
.
id
,
});
});
}
}
function
handleChange
()
{
function
handleChange
()
{
createMessage
.
success
(
'格式化成功'
);
createMessage
.
success
(
'格式化成功'
);
}
}
function
handleSuccess
()
{
createMessage
.
success
(
'提交成功'
);
}
//保存按钮
//保存按钮
function
handleSave
()
{
function
handleSave
()
{
createMessage
.
success
(
'保存成功'
);
createMessage
.
success
(
'保存成功'
);
...
@@ -236,7 +155,10 @@
...
@@ -236,7 +155,10 @@
function
goBack
()
{
function
goBack
()
{
// // 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
// // 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
// go('/scriptDevelopment/shellDevelopment/index');
// go('/scriptDevelopment/shellDevelopment/index');
router
.
back
();
// router.go(-1);
router
.
push
({
path
:
'/scriptDevelopment/shellDevelopment/index'
,
});
}
}
//同步滚动
//同步滚动
const
handleScroll
=
()
=>
{
const
handleScroll
=
()
=>
{
...
@@ -259,7 +181,6 @@
...
@@ -259,7 +181,6 @@
}
}
});
});
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
console
.
log
(
111111111111
);
path
.
value
=
getPathById
(
route
.
query
.
id
);
path
.
value
=
getPathById
(
route
.
query
.
id
);
await
nextTick
(()
=>
{
await
nextTick
(()
=>
{
if
(
editorLeft
.
value
&&
editorRight
.
value
)
{
if
(
editorLeft
.
value
&&
editorRight
.
value
)
{
...
@@ -269,34 +190,7 @@
...
@@ -269,34 +190,7 @@
});
});
});
});
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"less"
scoped
>
.editor-container
{
display
:
flex
;
}
.editor-left
{
flex
:
1
;
height
:
100%
;
overflow-y
:
hidden
;
}
.editor-right
{
flex
:
1
;
height
:
100%
;
overflow-y
:
hidden
;
}
.editor-wrapper
{
display
:
flex
;
justify-content
:
space-between
;
}
.editor-left
,
.editor-right
{
flex
:
1
;
overflow
:
hidden
;
}
:deep(.CodeMirror) {
:deep(.CodeMirror) {
height: 700px !important;
height: 700px !important;
}
}
...
...
src/views/scriptDevelopment/shellDevelopment/shellExecute/versionManagementModal.vue
View file @
71b59ac3
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
icon: 'ant-design:rollback-outlined',
icon: 'ant-design:rollback-outlined',
tooltip: '回退版本',
tooltip: '回退版本',
popConfirm: {
popConfirm: {
title: '是否确认回退版本',
title: '是否确认回退
至该
版本',
confirm: handleVersionRollback,
confirm: handleVersionRollback,
},
},
},
},
...
@@ -52,11 +52,13 @@
...
@@ -52,11 +52,13 @@
import
{
versionColumns
,
versionSchema
}
from
'./version.data'
;
import
{
versionColumns
,
versionSchema
}
from
'./version.data'
;
import
{
message
}
from
'ant-design-vue'
;
import
{
message
}
from
'ant-design-vue'
;
import
{
router
}
from
'@/router'
;
import
{
router
}
from
'@/router'
;
const
id
=
ref
();
const
title
=
ref
();
const
title
=
ref
();
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
console
.
log
(
data
)
title
.
value
=
data
.
title
;
title
.
value
=
data
.
title
;
id
.
value
=
data
.
id
;
});
});
const
[
registerTable
]
=
useTable
({
const
[
registerTable
]
=
useTable
({
dataSource
:
versionSchema
,
dataSource
:
versionSchema
,
...
@@ -71,14 +73,21 @@
...
@@ -71,14 +73,21 @@
});
});
function
handleDetail
()
{
function
handleDetail
()
{
console
.
log
(
'查看详情'
);
console
.
log
(
'查看详情'
);
console
.
log
(
id
.
value
);
router
.
push
({
router
.
push
({
path
:
'/scriptDevelopment/shellDevelopment/shellExecute/versionDetail'
,
path
:
'/scriptDevelopment/shellDevelopment/shellExecute/versionDetail'
,
query
:
{
id
:
id
.
value
,
},
});
});
}
}
function
modEdit
()
{
function
modEdit
()
{
console
.
log
(
'版本对比'
);
console
.
log
(
'版本对比'
);
router
.
push
({
router
.
push
({
path
:
'/scriptDevelopment/shellDevelopment/shellExecute/versionCompare'
,
path
:
'/scriptDevelopment/shellDevelopment/shellExecute/versionCompare'
,
query
:
{
id
:
id
.
value
,
},
});
});
}
}
function
handleVersionRollback
()
{
function
handleVersionRollback
()
{
...
...
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