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
5447f8c7
Commit
5447f8c7
authored
Nov 21, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增了服务开发页面
parent
c227fa26
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
651 additions
and
44 deletions
+651
-44
index.ts
src/router/routes/index.ts
+9
-0
ApiTree.vue
src/views/dataService/serviceDevelopment/ApiTree.vue
+0
-2
VersionModal.vue
src/views/dataService/serviceDevelopment/VersionModal.vue
+1
-1
api.data.ts
src/views/dataService/serviceDevelopment/api.data.ts
+340
-3
apiContrast.vue
src/views/dataService/serviceDevelopment/apiContrast.vue
+7
-4
apiDetail.vue
src/views/dataService/serviceDevelopment/apiDetail.vue
+152
-0
guideModeApi.vue
src/views/dataService/serviceDevelopment/guideModeApi.vue
+12
-2
sqlModeApi.vue
src/views/dataService/serviceDevelopment/sqlModeApi.vue
+15
-0
trusteeshipApiTest.vue
...ews/dataService/serviceDevelopment/trusteeshipApiTest.vue
+23
-28
trusteeshipApiTestResult.vue
...taService/serviceDevelopment/trusteeshipApiTestResult.vue
+77
-4
trusteeshipModeApi.vue
...ews/dataService/serviceDevelopment/trusteeshipModeApi.vue
+15
-0
No files found.
src/router/routes/index.ts
View file @
5447f8c7
...
@@ -751,6 +751,15 @@ export const serviceDevelopmentRoute: AppRouteRecordRaw = {
...
@@ -751,6 +751,15 @@ export const serviceDevelopmentRoute: AppRouteRecordRaw = {
icon
:
''
,
icon
:
''
,
},
},
},
},
{
path
:
'serviceDevelopment/apiDetail'
,
name
:
'apiDetail'
,
component
:
()
=>
import
(
'@/views/dataService/serviceDevelopment/apiDetail.vue'
),
meta
:
{
title
:
'API详情'
,
icon
:
''
,
},
},
],
],
};
};
...
...
src/views/dataService/serviceDevelopment/ApiTree.vue
View file @
5447f8c7
...
@@ -11,8 +11,6 @@
...
@@ -11,8 +11,6 @@
:treeData=
"treeData"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: 'apiName' }"
:fieldNames=
"
{ key: 'businessId', title: 'apiName' }"
@select="handleSelect"
@select="handleSelect"
:beforeRightClick="getRightMenuList"
:actionList="actionList"
/>
/>
</div>
</div>
<!-- 移动 弹窗-->
<!-- 移动 弹窗-->
...
...
src/views/dataService/serviceDevelopment/VersionModal.vue
View file @
5447f8c7
...
@@ -123,7 +123,7 @@ function returnButton() {
...
@@ -123,7 +123,7 @@ function returnButton() {
function
detailButton
(
record
)
{
function
detailButton
(
record
)
{
closeModal
();
closeModal
();
router
.
push
({
router
.
push
({
path
:
'/
serviceDevelopment/detailApi
'
,
path
:
'/
dataService/serviceDevelopment/apiDetail
'
,
query
:
{
query
:
{
businessId
:
route
.
query
.
businessId
,
businessId
:
route
.
query
.
businessId
,
},
},
...
...
src/views/dataService/serviceDevelopment/api.data.ts
View file @
5447f8c7
...
@@ -2101,9 +2101,346 @@ export const trusteeshipFormSchema1: FormSchema[] = [
...
@@ -2101,9 +2101,346 @@ export const trusteeshipFormSchema1: FormSchema[] = [
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
},
];
];
/**托管模式- 表单2*/
export
const
trusteeshipFormSchema2
:
FormSchema
[]
=
[
{
field
:
''
,
label
:
'请求代码'
,
component
:
'BasicTitle'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
,
backgroundColor
:
'transparent'
,
marginLeft
:
'15px'
,
fontWeight
:
'bold'
,
},
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'header1'
,
label
:
'header:'
,
component
:
'InputTextArea'
,
colProps
:
{
lg
:
24
,
md
:
24
},
rules
:
[
{
requirer
:
true
,
message
:
'请输入申请理由'
}
],
defaultValue
:
'Accept: application/json, text/plain, */*
\
n'
+
'Accept-Encoding: gzip, deflate
\
n'
+
'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
\
n'
+
'Authorization:
\
n'
+
'Content-Length: 218
\
n'
+
'Content-Type: application/json;charset=UTF-8
\
n'
+
'Host: 172.26.2.22:28180
\
n'
+
'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
\
n'
+
'x-requested-with: XMLHttpRequest'
,
componentProps
:
{
readonly
:
true
,
rows
:
10
,
placeholder
:
'请输入申请理由'
}
},
{
field
:
"body1"
,
label
:
"body:"
,
component
:
"InputTextArea"
,
colProps
:
{
"lg"
:
24
,
"md"
:
24
},
rules
:
[
{
required
:
true
,
message
:
"请输入申请理由"
}
],
defaultValue
:
'{
\
n'
+
'"category": "SERVICE",
\
n'
+
'"page": 1,
\
n'
+
'"size": 10,
\
n'
+
'"searchText": "",
\
n'
+
'"size": 10,
\
n'
+
'"timeRangeFilters": [],
\
n'
+
'"fieldFuzzySearch": [],
\
n'
+
'"childrenRequest": null,
\
n'
+
'"catalogFlag": false
\
n'
+
'}'
,
componentProps
:
{
readonly
:
true
,
rows
:
10
,
placeholder
:
"请输入申请理由"
}
},
{
field
:
''
,
label
:
'返回结果源码'
,
component
:
'BasicTitle'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
,
backgroundColor
:
'transparent'
,
marginLeft
:
'15px'
,
fontWeight
:
'bold'
,
},
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
"header2"
,
label
:
"header:"
,
component
:
"InputTextArea"
,
colProps
:
{
"lg"
:
24
,
"md"
:
24
},
rules
:
[
{
required
:
true
,
message
:
"请输入申请理由"
}
],
defaultValue
:
'Cache-Control: no-cache, no-store, max-age=0, must-revalidate
\
n'
+
'Content-Type: application/json
\
n'
+
'Date: Wed, 01 Feb 2023 08:51:06 GMT
\
n'
+
'Expires: Thu, 01 Feb 2023 08:51:06 GMT
\
n'
+
'Pragma: 0
\
n'
+
'Referrer-Policy: no-referrer
\
n'
+
'Transfer-Encoding: chunked
\
n'
+
'X-Content-Type-Options: nosniff
\
n'
+
'X-Frame-Options: DENY
\
n'
+
'X-XSS-Protection: 1; mode=block'
,
componentProps
:
{
readonly
:
true
,
rows
:
8
,
placeholder
:
"请输入申请理由"
}
},
{
field
:
"body2"
,
label
:
"body:"
,
component
:
"InputTextArea"
,
colProps
:
{
"lg"
:
24
,
"md"
:
24
},
rules
:
[
{
required
:
true
,
message
:
"请输入申请理由"
}
],
defaultValue
:
'{
\
n'
+
'"category": "SERVICE",
\
n'
+
'"page": 1,
\
n'
+
'"size": 10,
\
n'
+
'"searchText": "",
\
n'
+
'"size": 10,
\
n'
+
'"timeRangeFilters": [],
\
n'
+
'"fieldFuzzySearch": [],
\
n'
+
'"childrenRequest": null,
\
n'
+
'"catalogFlag": false
\
n'
+
'}'
,
componentProps
:
{
readonly
:
true
,
rows
:
8
,
placeholder
:
"请输入申请理由"
}
},
];
/**托管模式- 表单3*/
export
const
trusteeshipFormSchema3
:
FormSchema
[]
=
[
{
field
:
''
,
label
:
'请求URL'
,
component
:
'BasicTitle'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
,
backgroundColor
:
'transparent'
,
marginLeft
:
'15px'
,
fontWeight
:
'bold'
,
},
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'testUrl'
,
label
:
'测试URL'
,
component
:
'Input'
,
defaultValue
:
'http://172.26.2.22/${code1}/test/${code2}'
,
componentProps
:
{
style
:
{
border
:
'none'
,
},
readonly
:
true
,
placeholder
:
'请输入URL'
,
},
rules
:
[
{
required
:
true
,
message
:
'请输入URL'
,
},
],
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'requestUrl'
,
label
:
'请求URL'
,
component
:
'Input'
,
componentProps
:
{
placeholder
:
'请输入URL'
,
},
rules
:
[
{
required
:
true
,
message
:
'请输入URL'
,
},
],
itemProps
:
{
extra
:
'请复制测试URL并按API配置修改其中的参数信息'
,
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
''
,
label
:
'请求代码'
,
component
:
'BasicTitle'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
,
backgroundColor
:
'transparent'
,
marginLeft
:
'15px'
,
fontWeight
:
'bold'
,
},
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
"header"
,
label
:
"header:"
,
component
:
"InputTextArea"
,
defaultValue
:
'Accept: application/json, text/plain, */*
\
n'
+
'Accept-Encoding: gzip, deflate
\
n'
+
'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
\
n'
+
'Authorization:
\
n'
+
'Content-Length: 218
\
n'
+
'Content-Type: application/json;charset=UTF-8
\
n'
+
'Host: 172.26.2.22:28180
\
n'
+
'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
\
n'
+
'x-requested-with: XMLHttpRequest'
,
colProps
:
{
"lg"
:
24
,
"md"
:
24
},
rules
:
[
{
required
:
true
,
message
:
"请输入header"
}
],
componentProps
:
{
readonly
:
true
,
rows
:
8
,
placeholder
:
"请输入header"
}
},
{
field
:
"body"
,
label
:
"body:"
,
component
:
"InputTextArea"
,
defaultValue
:
'{
\
n'
+
'"category": "SERVICE",
\
n'
+
'"page": 1,
\
n'
+
'"size": 10,
\
n'
+
'"searchText": "",
\
n'
+
'"size": 10,
\
n'
+
'"timeRangeFilters": [],
\
n'
+
'"fieldFuzzySearch": [],
\
n'
+
'"childrenRequest": null,
\
n'
+
'"catalogFlag": false
\
n'
+
'}'
,
colProps
:
{
"lg"
:
24
,
"md"
:
24
},
rules
:
[
{
required
:
true
,
message
:
"请输入申请理由"
}
],
componentProps
:
{
readonly
:
true
,
rows
:
8
,
placeholder
:
"请输入申请理由"
}
},
];
/**托管模式- 表单4*/
export
const
trusteeshipFormSchema4
:
FormSchema
[]
=
[
{
field
:
''
,
label
:
'返回结果源码'
,
component
:
'BasicTitle'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
,
backgroundColor
:
'transparent'
,
marginLeft
:
'15px'
,
fontWeight
:
'bold'
,
},
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
"header2"
,
label
:
"header:"
,
component
:
"InputTextArea"
,
colProps
:
{
"lg"
:
24
,
"md"
:
24
},
rules
:
[
{
required
:
true
,
message
:
"请输入申请理由"
}
],
defaultValue
:
'Cache-Control: no-cache, no-store, max-age=0, must-revalidate
\
n'
+
'Content-Type: application/json
\
n'
+
'Date: Wed, 01 Feb 2023 08:51:06 GMT
\
n'
+
'Expires: Thu, 01 Feb 2023 08:51:06 GMT
\
n'
+
'Pragma: 0
\
n'
+
'Referrer-Policy: no-referrer
\
n'
+
'Transfer-Encoding: chunked
\
n'
+
'X-Content-Type-Options: nosniff
\
n'
+
'X-Frame-Options: DENY
\
n'
+
'X-XSS-Protection: 1; mode=block'
,
componentProps
:
{
readonly
:
true
,
rows
:
8
,
placeholder
:
"请输入申请理由"
}
},
{
field
:
"body2"
,
label
:
"body:"
,
component
:
"InputTextArea"
,
colProps
:
{
"lg"
:
24
,
"md"
:
24
},
rules
:
[
{
required
:
true
,
message
:
"请输入申请理由"
}
],
defaultValue
:
'{
\
n'
+
'"category": "SERVICE",
\
n'
+
'"page": 1,
\
n'
+
'"size": 10,
\
n'
+
'"searchText": "",
\
n'
+
'"size": 10,
\
n'
+
'"timeRangeFilters": [],
\
n'
+
'"fieldFuzzySearch": [],
\
n'
+
'"childrenRequest": null,
\
n'
+
'"catalogFlag": false
\
n'
+
'}'
,
componentProps
:
{
readonly
:
true
,
rows
:
8
,
placeholder
:
"请输入申请理由"
}
},
];
/**版本对比 表单*/
/**版本对比 表单*/
export
const
contrastSchema
:
FormSchema
[]
=
[
export
const
contrastSchema
:
FormSchema
[]
=
[
...
...
src/views/dataService/serviceDevelopment/apiContrast.vue
View file @
5447f8c7
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<div
style=
"font-size: 15px;padding-left: 10px;padding-left: 50px"
>
<div
style=
"font-size: 15px;padding-left: 10px;padding-left: 50px"
>
<div>
<div>
版本
<Select
版本
<Select
v-model:value=
"optionValue"
v-model:value=
"optionValue
1
"
show-search
show-search
placeholder=
"请选择版本"
placeholder=
"请选择版本"
style=
"width: 200px;margin-left: 10px"
style=
"width: 200px;margin-left: 10px"
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<div
style=
"font-size: 15px;padding-left: 10px;padding-left: 50px"
>
<div
style=
"font-size: 15px;padding-left: 10px;padding-left: 50px"
>
<div>
<div>
版本
<Select
版本
<Select
v-model:value=
"optionValue"
v-model:value=
"optionValue
2
"
show-search
show-search
placeholder=
"请选择版本"
placeholder=
"请选择版本"
style=
"width: 200px;margin-left: 10px"
style=
"width: 200px;margin-left: 10px"
...
@@ -86,7 +86,8 @@
...
@@ -86,7 +86,8 @@
defineOptions
({
name
:
'Metadata'
});
defineOptions
({
name
:
'Metadata'
});
const
route
=
useRoute
();
const
route
=
useRoute
();
const
optionValue
=
ref
(
''
)
const
optionValue1
=
ref
(
''
)
const
optionValue2
=
ref
(
''
)
const
startContrastFlag
=
ref
(
false
)
const
startContrastFlag
=
ref
(
false
)
const
title
=
ref
(
'员工薪资查询-向导模式'
)
const
title
=
ref
(
'员工薪资查询-向导模式'
)
const
options
=
ref
<
any
>
([
const
options
=
ref
<
any
>
([
...
@@ -94,6 +95,7 @@
...
@@ -94,6 +95,7 @@
{
value
:
'V2'
,
label
:
'V2 2022-10-25 14:52:50'
},
{
value
:
'V2'
,
label
:
'V2 2022-10-25 14:52:50'
},
{
value
:
'V3'
,
label
:
'V3 2022-10-25 14:52:50'
},
{
value
:
'V3'
,
label
:
'V3 2022-10-25 14:52:50'
},
]);
]);
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
labelWidth
:
100
,
...
@@ -260,6 +262,7 @@
...
@@ -260,6 +262,7 @@
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
optionValue
.
value
=
'V3'
optionValue1
.
value
=
'V3'
optionValue2
.
value
=
'V1'
});
});
</
script
>
</
script
>
src/views/dataService/serviceDevelopment/apiDetail.vue
0 → 100644
View file @
5447f8c7
<
template
>
<PageWrapper
title=
"版本管理"
contentFullHeight
contentBackground
contentClass=
"flex"
>
<div>
<div
style=
"display: flex;justify-content: space-between; align-items: center;margin-bottom: 10px;margin-left: 12px"
>
<div
style=
"margin-top: 10px;display: flex;font-weight: bold;font-size: 20px;margin-left: 10px"
>
<Icon
icon=
"ion:layers-outline"
:size=
"25"
:color=
"'#1091FE'"
/>
{{
title
}}
<div
style=
"font-size: 15px;padding-left: 10px;padding-left: 50px"
>
<div>
版本
<Select
v-model:value=
"optionValue1"
show-search
placeholder=
"请选择版本"
style=
"width: 200px;margin-left: 10px"
:options=
"options"
@
change=
"handleChange"
></Select>
</div>
</div>
</div>
</div>
<Divider
/>
<div>
<BasicForm
@
register=
"registerForm"
/>
</div>
<Divider
/>
<div>
<BasicTable
@
register=
"registerTable1"
/>
<BasicTable
@
register=
"registerTable2"
/>
<BasicTable
@
register=
"registerTable3"
/>
</div>
</div>
</PageWrapper>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
addValueSearchSchema
,
contrastSchema
,
contrastTableColumns1
,
contrastTableColumns2
,
contrastTableColumns3
,
resetNameFormSchema
}
from
'./api.data'
;
import
{
leftContrastTableData1
,
leftContrastTableData2
,
leftContrastTableData3
,
rightContrastTableData1
,
rightContrastTableData2
,
rightContrastTableData3
}
from
'./apiData'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
onMounted
,
ref
}
from
"vue"
;
import
{
Select
}
from
'ant-design-vue'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
router
}
from
"@/router"
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
Divider
}
from
'ant-design-vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
defineOptions
({
name
:
'Metadata'
});
const
route
=
useRoute
();
const
optionValue1
=
ref
(
''
)
const
optionValue2
=
ref
(
''
)
const
startContrastFlag
=
ref
(
false
)
const
title
=
ref
(
'员工薪资查询-向导模式'
)
const
options
=
ref
<
any
>
([
{
value
:
'V1'
,
label
:
'V1 2022-10-25 14:52:50'
},
{
value
:
'V2'
,
label
:
'V2 2022-10-25 14:52:50'
},
{
value
:
'V3'
,
label
:
'V3 2022-10-25 14:52:50'
},
]);
const
{
createMessage
}
=
useMessage
();
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
contrastSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
const
[
registerTable1
]
=
useTable
({
title
:
'请求参数'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
leftContrastTableData1
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
leftContrastTableData1
};
},
columns
:
contrastTableColumns1
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
bordered
:
true
,
scroll
:
{
y
:
300
},
});
const
[
registerTable2
]
=
useTable
({
title
:
'分页参数'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
rightContrastTableData2
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
rightContrastTableData2
};
},
columns
:
contrastTableColumns2
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
bordered
:
true
,
scroll
:
{
y
:
300
},
});
const
[
registerTable3
]
=
useTable
({
title
:
'返回参数'
,
api
:
async
(
params
)
=>
{
const
response
=
{
pageNu
:
"1"
,
pageSize
:
"10"
,
pages
:
"1"
,
total
:
leftContrastTableData3
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
leftContrastTableData3
};
},
columns
:
contrastTableColumns3
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
pagination
:
false
,
bordered
:
true
,
scroll
:
{
y
:
300
},
});
onMounted
(()
=>
{
optionValue1
.
value
=
'V3'
});
</
script
>
src/views/dataService/serviceDevelopment/guideModeApi.vue
View file @
5447f8c7
...
@@ -120,6 +120,8 @@
...
@@ -120,6 +120,8 @@
<ApiTestDrawer
@
register=
"registerApiTestDrawer"
@
success=
"handleSuccess"
/>
<ApiTestDrawer
@
register=
"registerApiTestDrawer"
@
success=
"handleSuccess"
/>
<!-- 数据预览 抽屉-->
<!-- 数据预览 抽屉-->
<DataPreviewDrawer
@
register=
"registerDataPreviewDrawer"
@
success=
"handleSuccess"
/>
<DataPreviewDrawer
@
register=
"registerDataPreviewDrawer"
@
success=
"handleSuccess"
/>
<!-- 版本发布申请 弹窗-->
<PublishApplicationModal
@
register=
"registerPublishApplicationModal"
@
success=
"handleSuccess"
/>
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -154,6 +156,8 @@
...
@@ -154,6 +156,8 @@
import
BasicInfoDrawer
from
'./BasicInfoDrawer.vue'
import
BasicInfoDrawer
from
'./BasicInfoDrawer.vue'
import
ApiTestDrawer
from
'./ApiTestDrawer.vue'
import
ApiTestDrawer
from
'./ApiTestDrawer.vue'
import
DataPreviewDrawer
from
'./DataPreviewDrawer.vue'
import
DataPreviewDrawer
from
'./DataPreviewDrawer.vue'
import
{
useModal
}
from
'@/components/Modal'
;
import
PublishApplicationModal
from
'./PublishApplicationModal.vue'
defineOptions
({
name
:
'Metadata'
});
defineOptions
({
name
:
'Metadata'
});
const
route
=
useRoute
();
const
route
=
useRoute
();
...
@@ -167,6 +171,7 @@
...
@@ -167,6 +171,7 @@
]);
]);
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerPublishApplicationModal
,
{
openModal
:
openPublishApplicationModal
}]
=
useModal
();
const
[
registerDataPreviewDrawer
,
{
openDrawer
:
openDataPreviewDrawer
}]
=
useDrawer
();
const
[
registerDataPreviewDrawer
,
{
openDrawer
:
openDataPreviewDrawer
}]
=
useDrawer
();
const
[
registerApiTestDrawer
,
{
openDrawer
:
openApiTestDrawer
}]
=
useDrawer
();
const
[
registerApiTestDrawer
,
{
openDrawer
:
openApiTestDrawer
}]
=
useDrawer
();
const
[
registerGuideModeForm
]
=
useForm
({
const
[
registerGuideModeForm
]
=
useForm
({
...
@@ -377,9 +382,14 @@
...
@@ -377,9 +382,14 @@
openApiTestDrawer
(
true
,{})
openApiTestDrawer
(
true
,{})
}
}
/**发布*/
/**发布
按钮
*/
function
publishButton
()
{
function
publishButton
()
{
const
data
=
{
apiName
:
'test01'
}
openPublishApplicationModal
(
true
,{
record
:
data
})
}
}
/**保存*/
/**保存*/
...
...
src/views/dataService/serviceDevelopment/sqlModeApi.vue
View file @
5447f8c7
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
<ApiTestDrawer
@
register=
"registerApiTestDrawer"
@
success=
"handleSuccess"
/>
<ApiTestDrawer
@
register=
"registerApiTestDrawer"
@
success=
"handleSuccess"
/>
<!-- 数据预览 抽屉-->
<!-- 数据预览 抽屉-->
<DataPreviewDrawer
@
register=
"registerDataPreviewDrawer"
@
success=
"handleSuccess"
/>
<DataPreviewDrawer
@
register=
"registerDataPreviewDrawer"
@
success=
"handleSuccess"
/>
<!-- 版本发布申请 弹窗-->
<PublishApplicationModal
@
register=
"registerPublishApplicationModal"
@
success=
"handleSuccess"
/>
</PageWrapper>
</PageWrapper>
</
template
>
</
template
>
...
@@ -39,9 +41,12 @@
...
@@ -39,9 +41,12 @@
import
BasicInfoDrawer
from
'./BasicInfoDrawer.vue'
import
BasicInfoDrawer
from
'./BasicInfoDrawer.vue'
import
ApiTestDrawer
from
'./ApiTestDrawer.vue'
import
ApiTestDrawer
from
'./ApiTestDrawer.vue'
import
DataPreviewDrawer
from
'./DataPreviewDrawer.vue'
import
DataPreviewDrawer
from
'./DataPreviewDrawer.vue'
import
PublishApplicationModal
from
'./PublishApplicationModal.vue'
import
{
useModal
}
from
'@/components/Modal'
;
defineOptions
({
name
:
'AccountDetail'
});
defineOptions
({
name
:
'AccountDetail'
});
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerPublishApplicationModal
,
{
openModal
:
openPublishApplicationModal
}]
=
useModal
();
const
[
registerDataPreviewDrawer
,
{
openDrawer
:
openDataPreviewDrawer
}]
=
useDrawer
();
const
[
registerDataPreviewDrawer
,
{
openDrawer
:
openDataPreviewDrawer
}]
=
useDrawer
();
const
[
registerApiTestDrawer
,
{
openDrawer
:
openApiTestDrawer
}]
=
useDrawer
();
const
[
registerApiTestDrawer
,
{
openDrawer
:
openApiTestDrawer
}]
=
useDrawer
();
const
current
=
ref
(
0
);
const
current
=
ref
(
0
);
...
@@ -74,6 +79,16 @@
...
@@ -74,6 +79,16 @@
})
})
}
}
/**发布 按钮*/
function
publishButton
()
{
const
data
=
{
apiName
:
'test02'
}
openPublishApplicationModal
(
true
,{
record
:
data
})
}
// 页面左侧点击返回链接时的操作
// 页面左侧点击返回链接时的操作
function
goBack
()
{
function
goBack
()
{
// 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
// 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页
...
...
src/views/dataService/serviceDevelopment/trusteeshipApiTest.vue
View file @
5447f8c7
<
template
>
<
template
>
<PageWrapper
title=
"API测试"
class=
"content-padding"
contentBackground
@
back=
"goBack"
>
<PageWrapper
title=
"API测试"
class=
"content-padding"
contentBackground
@
back=
"goBack"
>
<div
style=
"margin-top: 20px;margin-bottom: 20px;margin-left: 10px;display: flex"
>
<div
style=
"margin-top: 20px;margin-bottom: 20px;margin-left: 10px;display: flex"
>
参数输入模式
<Select
<div
style=
"font-weight: bold;align-items: center;display: flex"
>
参数输入模式
</div>
<Select
style=
"margin-left: 20px"
class=
"selectCss"
class=
"selectCss"
v-model:value=
"optionValue"
v-model:value=
"optionValue"
show-search
show-search
...
@@ -10,8 +12,13 @@
...
@@ -10,8 +12,13 @@
@
search=
"handleSearch"
@
search=
"handleSearch"
/>
/>
</div>
</div>
<BasicTable
@
register=
"registerTable1"
/>
<div
v-if=
"optionValue === '参数模式'"
>
<a-button
type=
"primary"
@
click=
"testButton"
>
测试
</a-button>
<BasicTable
@
register=
"registerTable"
/>
</div>
<div
v-if=
"optionValue === '报文模式'"
>
<BasicForm
@
register=
"registerForm"
/>
</div>
<a-button
type=
"primary"
@
click=
"testButton(optionValue)"
>
测试
</a-button>
</PageWrapper>
</PageWrapper>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -24,7 +31,7 @@
...
@@ -24,7 +31,7 @@
import
{
Select
,
Textarea
}
from
'ant-design-vue'
;
import
{
Select
,
Textarea
}
from
'ant-design-vue'
;
import
CodeEditor
from
"@/components/CodeEditor/src/CodeEditor.vue"
;
import
CodeEditor
from
"@/components/CodeEditor/src/CodeEditor.vue"
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
step2TableColumns2
,
trusteeshipTableColumns7
}
from
'./api.data'
;
import
{
trusteeshipTableColumns7
,
trusteeshipFormSchema3
}
from
'./api.data'
;
import
{
router
}
from
"@/router"
;
import
{
router
}
from
"@/router"
;
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
emit
=
defineEmits
([
'next'
]);
const
emit
=
defineEmits
([
'next'
]);
...
@@ -40,7 +47,7 @@
...
@@ -40,7 +47,7 @@
},
},
])
])
const
show
=
ref
(
false
)
const
show
=
ref
(
false
)
const
[
registerTable
1
]
=
useTable
({
const
[
registerTable
]
=
useTable
({
title
:
'请求参数'
,
title
:
'请求参数'
,
api
:
async
(
params
)
=>
{
api
:
async
(
params
)
=>
{
var
data
=
[];
var
data
=
[];
...
@@ -63,35 +70,23 @@
...
@@ -63,35 +70,23 @@
bordered
:
true
,
bordered
:
true
,
scroll
:
{
y
:
300
},
scroll
:
{
y
:
300
},
});
});
const
[
registerTable2
]
=
useTable
({
//初始化表单
title
:
'入参映射'
,
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
api
:
async
(
params
)
=>
{
labelWidth
:
100
,
var
data
=
[];
baseColProps
:
{
lg
:
12
,
md
:
24
},
const
response
=
{
schemas
:
trusteeshipFormSchema3
,
pageNu
:
"1"
,
showActionButtonGroup
:
false
,
pageSize
:
"10"
,
actionColOptions
:
{
pages
:
"1"
,
span
:
23
,
total
:
step2TableData2
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
step2TableData2
};
},
},
columns
:
step2TableColumns2
,
useSearchForm
:
false
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
bordered
:
true
,
scroll
:
{
y
:
300
},
});
});
/**测试按钮*/
/**测试按钮*/
function
testButton
(){
function
testButton
(){
router
.
push
({
router
.
push
({
path
:
'/dataService/serviceDevelopment/trusteeshipApiTestResult'
,
path
:
'/dataService/serviceDevelopment/trusteeshipApiTestResult'
,
query
:
{},
query
:
{
optionValue
:
optionValue
.
value
},
});
});
}
}
...
...
src/views/dataService/serviceDevelopment/trusteeshipApiTestResult.vue
View file @
5447f8c7
<
template
>
<
template
>
<PageWrapper
title=
""
contentFullHeight
contentBackground
>
<PageWrapper
title=
""
contentFullHeight
contentBackground
>
111
<div
class=
"inputClass"
v-if=
"optionValue === '参数模式'"
>
<BasicForm
@
register=
"registerForm1"
/>
</div>
<div
class=
"inputClass"
v-else
>
<BasicForm
@
register=
"registerForm2"
/>
</div>
</PageWrapper>
</PageWrapper>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
import
{
trusteeshipFormSchema2
,
trusteeshipFormSchema4
}
from
'./api.data'
;
}
from
'./api.data'
;
import
{
import
{
...
@@ -23,12 +28,80 @@
...
@@ -23,12 +28,80 @@
import
{
useDrawer
}
from
'@/components/Drawer'
;
import
{
useDrawer
}
from
'@/components/Drawer'
;
defineOptions
({
name
:
'Metadata'
});
defineOptions
({
name
:
'Metadata'
});
const
optionValue
=
ref
(
''
)
const
route
=
useRoute
();
const
route
=
useRoute
();
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
header1
=
ref
(
'Accept: application/json, text/plain, */*
\
n'
+
'Accept-Encoding: gzip, deflate
\
n'
+
'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
\
n'
+
'Authorization:
\
n'
+
'Content-Length: 218
\
n'
+
'Content-Type: application/json;charset=UTF-8
\
n'
+
'Host: 172.26.2.22:28180
\
n'
+
'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
\
n'
+
'x-requested-with: XMLHttpRequest'
);
const
body1
=
ref
(
'{
\
n'
+
'"category": "SERVICE",
\
n'
+
'"page": 1,
\
n'
+
'"size": 10,
\
n'
+
'"searchText": "",
\
n'
+
'"size": 10,
\
n'
+
'"timeRangeFilters": [],
\
n'
+
'"fieldFuzzySearch": [],
\
n'
+
'"childrenRequest": null,
\
n'
+
'"catalogFlag": false
\
n'
+
'}'
)
const
header2
=
ref
(
'Cache-Control: no-cache, no-store, max-age=0, must-revalidate
\
n'
+
'Content-Type: application/json
\
n'
+
'Date: Wed, 01 Feb 2023 08:51:06 GMT
\
n'
+
'Expires: Thu, 01 Feb 2023 08:51:06 GMT
\
n'
+
'Pragma: 0
\
n'
+
'Referrer-Policy: no-referrer
\
n'
+
'Transfer-Encoding: chunked
\
n'
+
'X-Content-Type-Options: nosniff
\
n'
+
'X-Frame-Options: DENY
\
n'
+
'X-XSS-Protection: 1; mode=block'
);
const
body2
=
ref
(
'{
\
n'
+
'"category": "SERVICE",
\
n'
+
'"page": 1,
\
n'
+
'"size": 10,
\
n'
+
'"searchText": "",
\
n'
+
'"size": 10,
\
n'
+
'"timeRangeFilters": [],
\
n'
+
'"fieldFuzzySearch": [],
\
n'
+
'"childrenRequest": null,
\
n'
+
'"catalogFlag": false
\
n'
+
'}'
)
//初始化表单
const
[
registerForm1
,
{
setFieldsValue
:
setFieldsValue1
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
trusteeshipFormSchema2
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化表单
const
[
registerForm2
,
{
setFieldsValue
:
setFieldsValue2
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
trusteeshipFormSchema4
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
onMounted
(()
=>
{
onMounted
(()
=>
{
optionValue
.
value
=
route
.
query
.
optionValue
;
});
});
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
.inputClass{
::v-deep(.ant-input){
background-color: rgb(244, 246, 251);
}
}
</
style
>
src/views/dataService/serviceDevelopment/trusteeshipModeApi.vue
View file @
5447f8c7
...
@@ -200,6 +200,8 @@
...
@@ -200,6 +200,8 @@
<DebugModal
@
register=
"registerDebugModal"
@
success=
"handleSuccess"
/>
<DebugModal
@
register=
"registerDebugModal"
@
success=
"handleSuccess"
/>
<!-- 基本信息 抽屉-->
<!-- 基本信息 抽屉-->
<BasicInfoDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<BasicInfoDrawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
<!-- 版本发布申请 弹窗-->
<PublishApplicationModal
@
register=
"registerPublishApplicationModal"
@
success=
"handleSuccess"
/>
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -220,6 +222,8 @@
...
@@ -220,6 +222,8 @@
import
{
useDrawer
}
from
'@/components/Drawer'
;
import
{
useDrawer
}
from
'@/components/Drawer'
;
import
BasicInfoDrawer
from
'./BasicInfoDrawer.vue'
import
BasicInfoDrawer
from
'./BasicInfoDrawer.vue'
import
{
router
}
from
"@/router"
;
import
{
router
}
from
"@/router"
;
import
PublishApplicationModal
from
'./PublishApplicationModal.vue'
defineOptions
({
name
:
'AccountModal'
});
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
...
@@ -251,6 +255,7 @@
...
@@ -251,6 +255,7 @@
},
},
])
])
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerPublishApplicationModal
,
{
openModal
:
openPublishApplicationModal
}]
=
useModal
();
const
[
registerDebugModal
,
{
openModal
:
openDebugModal
}]
=
useModal
();
const
[
registerDebugModal
,
{
openModal
:
openDebugModal
}]
=
useModal
();
//初始化弹框
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
...
@@ -446,6 +451,16 @@
...
@@ -446,6 +451,16 @@
}
}
/**发布 按钮*/
function
publishButton
()
{
const
data
=
{
apiName
:
'test03'
}
openPublishApplicationModal
(
true
,{
record
:
data
})
}
/**API测试 按钮*/
/**API测试 按钮*/
function
apiTestButton
()
{
function
apiTestButton
()
{
router
.
push
({
router
.
push
({
...
...
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