Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b527bb26
authored
2022-11-24 17:12:08 +0800
by
蔡俊立
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口服务
1 parent
9e058b07
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
8 deletions
src/views/jkfw/ptjk/components/addDialog.vue
src/views/jkfw/ptjk/components/retrieveDialog.vue
src/views/jkfw/ptjk/ptjkdata.js
src/views/jkfw/ptjk/components/addDialog.vue
View file @
b527bb2
...
...
@@ -74,7 +74,7 @@ export default {
interfaceMethods
:
[
'webapi'
,
'webservice'
],
interfaceTypes
:
[
{
'label'
:
'工作流服务平台'
,
'value'
:
'1'
},
{
'label'
:
'
管理
平台'
,
'value'
:
'2'
},
{
'label'
:
'
权限
平台'
,
'value'
:
'2'
},
{
'label'
:
'定时器服务'
,
'value'
:
'3'
},
{
'label'
:
'其他第三方平台'
,
'value'
:
'4'
},
],
...
...
src/views/jkfw/ptjk/components/retrieveDialog.vue
View file @
b527bb2
<
template
>
<dialogBox
title=
"调用接口"
@
submitForm=
"submitForm"
saveButton=
"调用"
width=
"50%"
:isFullscreen=
"false"
@
closeDialog=
"closeDialog"
v-model=
"value"
>
<el-descriptions
class=
"margin-top"
:column=
"1"
:size=
"16"
border
>
<el-descriptions
class=
"margin-top"
:column=
"1"
:size=
"16"
border
style=
"height:600px"
>
<el-descriptions-item>
<template
slot=
"label"
style=
"width:200px"
>
接口代码
</
template
>
{{ruleForm.interfaceCode}}
</el-descriptions-item>
...
...
@@ -15,16 +15,21 @@
<
template
slot=
"label"
>
接口方式
</
template
>
{{ruleForm.interfaceMethod}}
</el-descriptions-item>
<el-descriptions-item>
<
template
slot=
"label"
>
接口类型
</
template
>
{{
ruleForm.interfaceType
}}
<
template
slot=
"label"
>
接口类型
</
template
>
{{
getInterfaceType(ruleForm.interfaceType)
}}
</el-descriptions-item>
<el-descriptions-item>
<
template
slot=
"label"
>
接口参数
</
template
><el-input
v-model=
"interfaceParams"
type=
"textarea"
:rows=
"4"
></el-input>
</el-descriptions-item>
<el-descriptions-item>
<
template
slot=
"label"
>
调用状态
</
template
>
{{returnMessage.statusCode}}
<
template
slot=
"label"
>
调用状态
</
template
>
<div
style=
"color:green"
v-if=
"returnMessage"
>
{{returnMessage.statusCode}}
</div>
<div
style=
"color:red"
v-else
>
ERROR
</div>
</el-descriptions-item>
<el-descriptions-item>
<
template
slot=
"label"
>
返回结果
</
template
>
{{returnMessage.body}}
<div
slot=
"label"
style=
"height:150px"
>
返回结果
</div>
<div
v-if=
"returnMessage"
>
{{returnMessage.body}}
</div>
<div
v-else
>
无效的接口CODE,请检查接口配置
</div>
</el-descriptions-item>
</el-descriptions>
</dialogBox>
...
...
@@ -46,7 +51,7 @@ export default {
interfaceMethods
:
[
'webapi'
,
'webservice'
],
interfaceTypes
:
[
{
'label'
:
'工作流服务平台'
,
'value'
:
'1'
},
{
'label'
:
'
管理
平台'
,
'value'
:
'2'
},
{
'label'
:
'
权限
平台'
,
'value'
:
'2'
},
{
'label'
:
'定时器服务'
,
'value'
:
'3'
},
{
'label'
:
'其他第三方平台'
,
'value'
:
'4'
},
],
...
...
@@ -60,11 +65,11 @@ export default {
submitForm
()
{
var
formdata
=
new
FormData
();
formdata
.
append
(
"interfaceCode"
,
this
.
ruleForm
.
interfaceCode
);
formdata
.
append
(
"interfaceType"
,
this
.
ruleForm
.
interfaceType
);
formdata
.
append
(
"params"
,
this
.
interfaceParams
);
interfaceRetrieve
(
formdata
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
returnMessage
=
res
.
result
}
})
},
...
...
@@ -77,10 +82,27 @@ export default {
this
.
$emit
(
"input"
,
false
);
this
.
interfaceParams
=
'{\n\n}'
this
.
returnMessage
=
{}
},
//获取接口类型
getInterfaceType
(
code
){
let
name
=
''
for
(
let
item
of
this
.
interfaceTypes
)
{
if
(
item
.
value
==
code
)
{
name
=
item
.
label
;
break
;
}
}
return
name
;
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
@import
"~@/styles/mixin.scss"
;
/
deep
/
.is-bordered-label
{
width
:
100px
}
/
deep
/
.el-descriptions-item__content
:nth-last-child
()
{
height
:
100px
;
}
</
style
>
...
...
src/views/jkfw/ptjk/ptjkdata.js
View file @
b527bb2
...
...
@@ -49,7 +49,7 @@ class data extends filter {
case
'1'
:
return
<
div
>
工作流服务平台
<
/div
>
case
'2'
:
return
<
div
>
管理
平台
<
/div
>
return
<
div
>
权限
平台
<
/div
>
case
'3'
:
return
<
div
>
定时器服务
<
/div
>
case
'4'
:
...
...
Please
register
or
sign in
to post a comment