Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lmp_web
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
yujian
lmp_web
Commits
2f8a418d
Commit
2f8a418d
authored
May 09, 2024
by
pengxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应用接入修改。
parent
b5fd853c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
402 additions
and
381 deletions
+402
-381
ApiManage.js
src/api/GptController/ApiManage.js
+21
-0
gptController.js
src/api/gptController.js
+2
-2
development.js
src/core/config/development.js
+1
-1
systemRouters.js
src/router/systemRouters.js
+1
-1
editOrAdd.vue
...s/gptTraining/modelService/apiManage/dialog/editOrAdd.vue
+111
-111
index.vue
src/views/gptTraining/modelService/apiManage/index.vue
+266
-266
No files found.
src/api/GptController/
applicationAccess
.js
→
src/api/GptController/
ApiManage
.js
View file @
2f8a418d
export
default
class
applicationAccess
{
export
default
class
ApiManage
{
static
list
(
sender
,
params
,
axiosOption
,
httpOption
)
{
static
list
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/list'
,
'post'
,
params
,
axiosOption
,
httpOption
);
return
sender
.
doUrl
(
'/admin/app/ap
iManage/list'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
}
static
view
(
sender
,
params
,
axiosOption
,
httpOption
)
{
static
view
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/view'
,
'get'
,
params
,
axiosOption
,
httpOption
);
return
sender
.
doUrl
(
'/admin/app/ap
iManage/view'
,
'get'
,
params
,
axiosOption
,
httpOption
);
}
}
static
add
(
sender
,
params
,
axiosOption
,
httpOption
)
{
static
add
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/add'
,
'post'
,
params
,
axiosOption
,
httpOption
);
return
sender
.
doUrl
(
'/admin/app/ap
iManage/add'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
}
static
update
(
sender
,
params
,
axiosOption
,
httpOption
)
{
static
update
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/update'
,
'post'
,
params
,
axiosOption
,
httpOption
);
return
sender
.
doUrl
(
'/admin/app/ap
iManage/update'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
}
static
delete
(
sender
,
params
,
axiosOption
,
httpOption
)
{
static
delete
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/delete'
,
'post'
,
params
,
axiosOption
,
httpOption
);
return
sender
.
doUrl
(
'/admin/app/ap
iManage/delete'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
}
}
}
src/api/gptController.js
View file @
2f8a418d
...
@@ -19,7 +19,7 @@ import DatasetData from './GptController/DatasetData.js';
...
@@ -19,7 +19,7 @@ import DatasetData from './GptController/DatasetData.js';
import
ModelDeployment
from
'./GptController/ModelDeployment.js'
;
import
ModelDeployment
from
'./GptController/ModelDeployment.js'
;
import
KnowledgeGraph
from
'./GptController/KnowledgeGraph.js'
;
import
KnowledgeGraph
from
'./GptController/KnowledgeGraph.js'
;
import
DataSetCleaning
from
'./GptController/DataSetCleaning.js'
;
import
DataSetCleaning
from
'./GptController/DataSetCleaning.js'
;
import
applicationAccess
from
'./GptController/applicationAccess
.js'
;
import
ApiManage
from
'./GptController/ApiManage
.js'
;
export
{
export
{
TemplateController
,
TemplateController
,
...
@@ -42,5 +42,5 @@ export {
...
@@ -42,5 +42,5 @@ export {
ModelDeployment
,
ModelDeployment
,
KnowledgeGraph
,
KnowledgeGraph
,
DataSetCleaning
,
DataSetCleaning
,
applicationAccess
ApiManage
}
}
src/core/config/development.js
View file @
2f8a418d
module
.
exports
=
{
module
.
exports
=
{
// baseUrl: 'http://218.76.0.69:8082/',
// baseUrl: 'http://218.76.0.69:8082/',
// baseUrl: 'http://192.168.0.34:8082/',
// baseUrl: 'http://192.168.0.34:8082/',
baseUrl
:
'http://192.168.0.
36
:8082/'
,
baseUrl
:
'http://192.168.0.
168
:8082/'
,
// baseUrl: 'http://192.168.0.34:8082/',
// baseUrl: 'http://192.168.0.34:8082/',
wsUrl
:
'ws://218.76.0.69:7860/'
,
wsUrl
:
'ws://218.76.0.69:7860/'
,
projectName
:
'灵境大模型平台'
projectName
:
'灵境大模型平台'
...
...
src/router/systemRouters.js
View file @
2f8a418d
...
@@ -56,7 +56,7 @@ const routers = [
...
@@ -56,7 +56,7 @@ const routers = [
{
path
:
'modelDeployment'
,
component
:
_import
(
'gptTraining/modelManagement/modelDeployment/index'
),
name
:
'modelDeployment'
,
props
:
getProps
,
meta
:
{
title
:
'模型部署'
}
},
{
path
:
'modelDeployment'
,
component
:
_import
(
'gptTraining/modelManagement/modelDeployment/index'
),
name
:
'modelDeployment'
,
props
:
getProps
,
meta
:
{
title
:
'模型部署'
}
},
// 模型服务
// 模型服务
{
path
:
'serviceManagement'
,
component
:
_import
(
'gptTraining/modelService/serviceManagement/index'
),
name
:
'serviceManagement'
,
props
:
getProps
,
meta
:
{
title
:
'在线服务'
}
},
{
path
:
'serviceManagement'
,
component
:
_import
(
'gptTraining/modelService/serviceManagement/index'
),
name
:
'serviceManagement'
,
props
:
getProps
,
meta
:
{
title
:
'在线服务'
}
},
{
path
:
'ap
plicationAccess'
,
component
:
_import
(
'gptTraining/modelService/applicationAccess/index'
),
name
:
'applicationAccess
'
,
props
:
getProps
,
meta
:
{
title
:
'应用接入'
}
},
{
path
:
'ap
iManage'
,
component
:
_import
(
'gptTraining/modelService/apiManage/index'
),
name
:
'apiManage
'
,
props
:
getProps
,
meta
:
{
title
:
'应用接入'
}
},
{
path
:
'testOnline'
,
component
:
_import
(
'gptTraining/modelService/testOnline/index'
),
name
:
'testOnline'
,
props
:
getProps
,
meta
:
{
title
:
'在线测试'
}
},
{
path
:
'testOnline'
,
component
:
_import
(
'gptTraining/modelService/testOnline/index'
),
name
:
'testOnline'
,
props
:
getProps
,
meta
:
{
title
:
'在线测试'
}
},
{
path
:
'callStatistics'
,
component
:
_import
(
'gptTraining/modelService/callStatistics/index'
),
name
:
'callStatistics'
,
props
:
getProps
,
meta
:
{
title
:
'调用统计'
}
},
{
path
:
'callStatistics'
,
component
:
_import
(
'gptTraining/modelService/callStatistics/index'
),
name
:
'callStatistics'
,
props
:
getProps
,
meta
:
{
title
:
'调用统计'
}
},
// Prompt工程
// Prompt工程
...
...
src/views/gptTraining/modelService/ap
plicationAccess
/dialog/editOrAdd.vue
→
src/views/gptTraining/modelService/ap
iManage
/dialog/editOrAdd.vue
View file @
2f8a418d
<!-- 基本信息-->
<!-- 基本信息-->
<
template
>
<
template
>
<el-form
label-position=
"left"
ref=
"form"
label-width=
"100px"
:model=
"form"
:size=
"defaultFormItemSize"
:rules=
"rules"
>
<el-form
label-position=
"left"
ref=
"form"
label-width=
"100px"
:model=
"form"
:size=
"defaultFormItemSize"
:rules=
"rules"
>
<el-row
class=
"title"
>
基本信息
</el-row>
<el-row
class=
"title"
>
基本信息
</el-row>
<el-form-item
label=
"应用名称:"
prop=
"ap
plicationAccessDto.applicationName"
>
<el-form-item
label=
"应用名称:"
prop=
"ap
iManageDto.apiName"
>
<el-input
v-model=
"form.ap
plicationAccessDto.applicationName"
class=
"inputWidth"
:size=
"defaultFormItemSize"
></el-input>
<el-input
v-model=
"form.ap
iManageDto.apiName"
class=
"inputWidth"
:size=
"defaultFormItemSize"
></el-input>
<el-row>
<span
class=
"introduce"
>
支持中英文、数字、下划线(_),2-20个字符,不能以下划线为开头
</span></el-row>
<el-row>
<span
class=
"introduce"
>
支持中英文、数字、下划线(_),2-20个字符,不能以下划线为开头
</span></el-row>
</el-form-item>
</el-form-item>
<el-form-item
label=
"应用描述:"
>
<el-form-item
label=
"应用描述:"
>
<el-input
v-model=
"form.ap
plicationAccessDto.applicationDescribe"
type=
"textarea"
class=
"inputWidth"
:rows=
"5"
:size=
"defaultFormItemSize"
></el-input>
<el-input
v-model=
"form.ap
iManageDto.remark"
type=
"textarea"
class=
"inputWidth"
:rows=
"5"
:size=
"defaultFormItemSize"
></el-input>
</el-form-item>
</el-form-item>
<el-row
type=
"flex"
justify=
"end"
class=
"dialog-btn-layer mt20"
>
<el-row
type=
"flex"
justify=
"end"
class=
"dialog-btn-layer mt20"
>
<el-button
:size=
"defaultFormItemSize"
:plain=
"true"
@
click=
"onCancel(false)"
>
取消
</el-button>
<el-button
:size=
"defaultFormItemSize"
:plain=
"true"
@
click=
"onCancel(false)"
>
取消
</el-button>
<el-button
type=
"primary"
:size=
"defaultFormItemSize"
@
click=
"onSubmit"
>
确定
</el-button>
<el-button
type=
"primary"
:size=
"defaultFormItemSize"
@
click=
"onSubmit"
>
确定
</el-button>
</el-row>
</el-row>
</el-form>
</el-form>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
applicationAccess
}
from
'@/api/gptController.js'
import
{
ApiManage
}
from
'@/api/gptController.js'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
taskList
:
[],
taskList
:
[],
runNameList
:
[],
runNameList
:
[],
form
:
{
form
:
{
ap
plicationAccessDto
:
{
ap
iManageDto
:
{
applicationDescribe
:
''
,
remark
:
''
,
ap
plicationName
:
''
ap
iName
:
''
}
}
},
},
rules
:
{
rules
:
{
'ap
plicationAccessDto.applicationName'
:
[{
required
:
true
,
message
:
'请输入应用名称'
,
trigger
:
'blur'
}]
'ap
iManageDto.apiName'
:
[{
required
:
true
,
message
:
'请输入应用名称'
,
trigger
:
'blur'
}]
}
}
}
}
},
},
props
:
[
'isEdit'
,
'item'
],
props
:
[
'isEdit'
,
'item'
],
components
:
{},
components
:
{},
computed
:
{},
computed
:
{},
mounted
()
{
mounted
()
{
this
.
intFrom
()
this
.
intFrom
()
this
.
getTaskList
()
this
.
getTaskList
()
// this.getTuningRun()
// this.getTuningRun()
},
},
methods
:
{
methods
:
{
intFrom
()
{
intFrom
()
{
this
.
form
=
{
...
this
.
form
,
...
this
.
item
}
this
.
form
=
{
...
this
.
form
,
...
this
.
item
}
try
{
try
{
this
.
form
.
templateLabel
=
JSON
.
parse
(
this
.
item
.
templateLabel
)
this
.
form
.
templateLabel
=
JSON
.
parse
(
this
.
item
.
templateLabel
)
}
catch
(
error
)
{
}
catch
(
error
)
{
// console.log(error);
// console.log(error);
}
}
},
},
onCancel
(
isSuccess
)
{
onCancel
(
isSuccess
)
{
if
(
this
.
observer
!=
null
)
{
if
(
this
.
observer
!=
null
)
{
this
.
observer
.
cancel
(
isSuccess
)
this
.
observer
.
cancel
(
isSuccess
)
}
}
},
},
onSubmit
()
{
onSubmit
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
let
params
=
{}
let
params
=
{}
params
=
{
...
this
.
form
}
params
=
{
...
this
.
form
}
if
(
this
.
isEdit
)
{
if
(
this
.
isEdit
)
{
applicationAccess
.
update
(
this
,
params
)
ApiManage
.
update
(
this
,
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
resolve
(
res
)
resolve
(
res
)
this
.
$message
.
success
(
'编辑成功'
)
this
.
$message
.
success
(
'编辑成功'
)
this
.
onCancel
(
true
)
this
.
onCancel
(
true
)
})
})
.
catch
((
e
)
=>
{
.
catch
((
e
)
=>
{
reject
(
e
)
reject
(
e
)
})
})
}
else
{
}
else
{
applicationAccess
.
add
(
this
,
params
)
ApiManage
.
add
(
this
,
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
resolve
(
res
)
resolve
(
res
)
this
.
$message
.
success
(
'添加成功'
)
this
.
$message
.
success
(
'添加成功'
)
this
.
onCancel
(
true
)
this
.
onCancel
(
true
)
})
})
.
catch
((
e
)
=>
{
.
catch
((
e
)
=>
{
reject
(
e
)
reject
(
e
)
})
})
}
}
}
else
{
}
else
{
// reject();
// reject();
}
}
})
})
})
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.inputWidth
{
.inputWidth
{
width
:
600px
;
width
:
600px
;
}
}
.title
{
.title
{
font-size
:
20px
;
font-size
:
20px
;
margin-bottom
:
16px
;
margin-bottom
:
16px
;
}
}
.introduce
{
.introduce
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#909399
;
color
:
#909399
;
}
}
</
style
>
</
style
>
src/views/gptTraining/modelService/ap
plicationAccess
/index.vue
→
src/views/gptTraining/modelService/ap
iManage
/index.vue
View file @
2f8a418d
<!--应用接入-->
<!--应用接入-->
<
template
>
<
template
>
<div
style=
"position: relative"
>
<div
style=
"position: relative"
>
<el-collapse
v-model=
"activeName"
accordion
ref=
"collapse"
v-resize=
"resize"
style=
"margin-bottom:20px"
>
<el-collapse
v-model=
"activeName"
accordion
ref=
"collapse"
v-resize=
"resize"
style=
"margin-bottom:20px"
>
<el-collapse-item
name=
"1"
>
<el-collapse-item
name=
"1"
>
<template
slot=
"title"
>
<template
slot=
"title"
>
<div
class=
"title"
>
操作指引
</div>
<div
class=
"title"
>
操作指引
</div>
</
template
>
</
template
>
<div
class=
"instructions"
>
<div
class=
"instructions"
>
<div
class=
"instructionsList"
>
<div
class=
"instructionsList"
>
<div
class=
"item"
v-for=
"(item, index) in instructionsList"
:key=
"index"
>
<div
class=
"item"
v-for=
"(item, index) in instructionsList"
:key=
"index"
>
<div
style=
"height:100%"
>
<div
style=
"height:100%"
>
<img
class=
"img"
:src=
"item.img"
alt=
""
/>
<img
class=
"img"
:src=
"item.img"
alt=
""
/>
<div
class=
"itemTitle"
>
<div
class=
"itemTitle"
>
<span
class=
"head-index"
>
{{ index + 1 }}
</span>
{{ item.title }}
<span
class=
"head-index"
>
{{ index + 1 }}
</span>
{{ item.title }}
</div>
</div>
<div
class=
"itemDescribe"
>
{{ item.describe }}
</div>
<div
class=
"itemDescribe"
>
{{ item.describe }}
</div>
</div>
</div>
<i
v-if=
"instructionsList.length!==index+1"
class=
"el-icon-arrow-right"
style=
"margin-left: 50px; font-size: 30px; font-weight: bolder;color:#b8babf"
></i>
<i
v-if=
"instructionsList.length!==index+1"
class=
"el-icon-arrow-right"
style=
"margin-left: 50px; font-size: 30px; font-weight: bolder;color:#b8babf"
></i>
</div>
</div>
</div>
</div>
</div>
</div>
</el-collapse-item>
</el-collapse-item>
</el-collapse>
</el-collapse>
<div
class=
"tableBox"
:style=
"{ height: tableHeight }"
>
<div
class=
"tableBox"
:style=
"{ height: tableHeight }"
>
<el-form
ref=
"myDataSetPage"
:model=
"myDataSetPage"
label-width=
"75px"
:size=
"defaultFormItemSize"
label-position=
"right"
@
submit
.
native
.
prevent
>
<el-form
ref=
"myDataSetPage"
:model=
"myDataSetPage"
label-width=
"75px"
:size=
"defaultFormItemSize"
label-position=
"right"
@
submit
.
native
.
prevent
>
<filter-box
:item-width=
"350"
@
search=
"refresh()"
@
reset=
"onReset"
>
<filter-box
:item-width=
"350"
@
search=
"refresh()"
@
reset=
"onReset"
>
<el-form-item
label-width=
"0px"
>
<el-form-item
label-width=
"0px"
>
<el-button
class=
"add"
type=
"primary"
icon=
"el-icon-plus"
:size=
"defaultFormItemSize"
@
click=
"add"
>
创建应用
</el-button>
<el-button
class=
"add"
type=
"primary"
icon=
"el-icon-plus"
:size=
"defaultFormItemSize"
@
click=
"add"
>
创建应用
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
label=
"应用名称"
prop=
"formFilter.modelName"
label-width=
"120px"
>
<el-form-item
label=
"应用名称"
prop=
"formFilter.modelName"
label-width=
"120px"
>
<el-input
class=
"filter-item"
v-model=
"myDataSetPage.formFilter.ap
plicationName"
:clearable=
"true"
placeholder=
"应用名称"
/>
<el-input
class=
"filter-item"
v-model=
"myDataSetPage.formFilter.ap
iName"
:clearable=
"true"
placeholder=
"应用名称"
/>
</el-form-item>
</el-form-item>
</filter-box>
</filter-box>
</el-form>
</el-form>
<vxe-table
border
show-header-overflow
show-overflow
:row-config=
"{ isHover: true }"
:data=
"myDataSetPage.tableData.impl.dataList"
min-height=
"96"
>
<vxe-table
border
show-header-overflow
show-overflow
:row-config=
"{ isHover: true }"
:data=
"myDataSetPage.tableData.impl.dataList"
min-height=
"96"
>
<vxe-column
field=
"ap
plicationName"
title=
"应用名称"
></vxe-column>
<vxe-column
field=
"ap
iName"
title=
"应用名称"
></vxe-column>
<vxe-column
field=
"appId"
title=
"AppID"
></vxe-column>
<vxe-column
field=
"appId"
title=
"AppID"
></vxe-column>
<vxe-column
field=
"apiKey"
title=
"API Key"
></vxe-column>
<vxe-column
field=
"apiKey"
title=
"API Key"
></vxe-column>
<vxe-column
field=
"secretKey"
title=
"Secret Key"
></vxe-column>
<vxe-column
field=
"secretKey"
title=
"Secret Key"
></vxe-column>
<vxe-column
field=
"
applicationDescribe"
title=
"描述"
></vxe-column>
<vxe-column
field=
"
remark"
title=
"描述"
></vxe-column>
<vxe-column
field=
"createTime"
title=
"创建时间"
></vxe-column>
<vxe-column
field=
"createTime"
title=
"创建时间"
></vxe-column>
<vxe-column
field=
"operation"
title=
"操作"
>
<vxe-column
field=
"operation"
title=
"操作"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<!--
<el-button
<!--
<el-button
type=
"text"
type=
"text"
:size=
"defaultFormItemSize"
:size=
"defaultFormItemSize"
@
click=
"dataImport(scope.row)"
@
click=
"dataImport(scope.row)"
>
导入
</el-button
>
导入
</el-button
>
-->
>
-->
<el-button
type=
"text"
icon=
"el-icon-delete"
:size=
"defaultFormItemSize"
@
click=
"del(scope.row)"
>
删除
</el-button>
<el-button
type=
"text"
icon=
"el-icon-delete"
:size=
"defaultFormItemSize"
@
click=
"del(scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</vxe-column>
</vxe-column>
</vxe-table>
</vxe-table>
<el-row
slot=
"pagination"
type=
"flex"
justify=
"end"
style=
"margin-top: 16px;width: 100%;"
>
<el-row
slot=
"pagination"
type=
"flex"
justify=
"end"
style=
"margin-top: 16px;width: 100%;"
>
<el-pagination
:total=
"myDataSetPage.tableData.impl.totalCount"
:current-page=
"myDataSetPage.tableData.impl.currentPage"
:page-size=
"myDataSetPage.tableData.impl.pageSize"
:page-sizes=
"[10, 20, 50, 100]"
layout=
"total, prev, pager, next, sizes"
@
current-change=
"myDataSetPage.tableData.impl.onCurrentPageChange"
@
size-change=
"myDataSetPage.tableData.impl.onPageSizeChange"
>
<el-pagination
:total=
"myDataSetPage.tableData.impl.totalCount"
:current-page=
"myDataSetPage.tableData.impl.currentPage"
:page-size=
"myDataSetPage.tableData.impl.pageSize"
:page-sizes=
"[10, 20, 50, 100]"
layout=
"total, prev, pager, next, sizes"
@
current-change=
"myDataSetPage.tableData.impl.onCurrentPageChange"
@
size-change=
"myDataSetPage.tableData.impl.onPageSizeChange"
>
</el-pagination>
</el-pagination>
</el-row>
</el-row>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
/* eslint-disable-next-line */
/* eslint-disable-next-line */
import
{
DropdownWidget
,
TableWidget
,
UploadWidget
,
ChartWidget
}
from
'@/utils/widget.js'
import
{
DropdownWidget
,
TableWidget
,
UploadWidget
,
ChartWidget
}
from
'@/utils/widget.js'
import
{
applicationAccess
}
from
'@/api/gptController.js'
import
{
ApiManage
}
from
'@/api/gptController.js'
import
editOrAdd
from
'./dialog/editOrAdd'
import
editOrAdd
from
'./dialog/editOrAdd'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
activeName
:
'1'
,
activeName
:
'1'
,
collapseHeight
:
0
,
collapseHeight
:
0
,
instructionsList
:
[
instructionsList
:
[
{
{
title
:
'创建应用'
,
title
:
'创建应用'
,
describe
:
'创建应用, 获取密钥'
,
describe
:
'创建应用, 获取密钥'
,
img
:
require
(
'@/assets/img/pg1.svg'
)
img
:
require
(
'@/assets/img/pg1.svg'
)
},
},
{
{
title
:
'调用服务'
,
title
:
'调用服务'
,
describe
:
'查看请求示例, 调用服务'
,
describe
:
'查看请求示例, 调用服务'
,
img
:
require
(
'@/assets/img/pg2.svg'
)
img
:
require
(
'@/assets/img/pg2.svg'
)
},
},
{
{
title
:
'查看用量'
,
title
:
'查看用量'
,
describe
:
'查看报表了解使用情况'
,
describe
:
'查看报表了解使用情况'
,
img
:
require
(
'@/assets/img/pg3.svg'
)
img
:
require
(
'@/assets/img/pg3.svg'
)
}
}
],
],
myDataSetPage
:
{
myDataSetPage
:
{
formFilter
:
{
formFilter
:
{
ap
plicationName
:
''
ap
iName
:
''
},
},
tableData
:
{
tableData
:
{
impl
:
new
TableWidget
(
this
.
getwidgetData
,
true
,
true
,
false
,
undefined
,
false
)
impl
:
new
TableWidget
(
this
.
getwidgetData
,
true
,
true
,
false
,
undefined
,
false
)
}
}
}
}
}
}
},
},
components
:
{},
components
:
{},
computed
:
{
computed
:
{
...
mapGetters
([
'getMainContextHeight'
]),
...
mapGetters
([
'getMainContextHeight'
]),
tableHeight
()
{
tableHeight
()
{
return
this
.
getMainContextHeight
-
this
.
collapseHeight
-
55
+
'px'
return
this
.
getMainContextHeight
-
this
.
collapseHeight
-
55
+
'px'
}
}
},
},
methods
:
{
methods
:
{
getwidgetData
(
params
)
{
getwidgetData
(
params
)
{
if
(
params
==
null
)
params
=
{}
if
(
params
==
null
)
params
=
{}
params
=
{
params
=
{
...
params
,
...
params
,
ap
plicationAccessDtoFilter
:
{
...
this
.
myDataSetPage
.
formFilter
}
ap
iManageDtoFilter
:
{
...
this
.
myDataSetPage
.
formFilter
}
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
applicationAccess
ApiManage
.
list
(
this
,
params
)
.
list
(
this
,
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
resolve
({
resolve
({
dataList
:
res
.
data
.
dataList
,
dataList
:
res
.
data
.
dataList
,
totalCount
:
res
.
data
.
totalCount
totalCount
:
res
.
data
.
totalCount
})
})
})
})
.
catch
((
e
)
=>
{
.
catch
((
e
)
=>
{
reject
(
e
)
reject
(
e
)
})
})
})
})
},
},
add
()
{
add
()
{
this
.
$dialog
this
.
$dialog
.
show
(
.
show
(
'创建应用'
,
'创建应用'
,
editOrAdd
,
editOrAdd
,
{
{
area
:
[
'50%'
,
'70%'
]
area
:
[
'50%'
,
'70%'
]
},
},
{
isEdit
:
false
}
{
isEdit
:
false
}
)
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
refresh
()
this
.
refresh
()
})
})
.
catch
((
e
)
=>
{
.
catch
((
e
)
=>
{
this
.
refresh
()
this
.
refresh
()
})
})
},
},
del
(
item
)
{
del
(
item
)
{
this
.
$confirm
(
'是否确认删除'
,
'提示'
,
{
this
.
$confirm
(
'是否确认删除'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
let
params
=
{
kgId
:
item
.
kgId
}
let
params
=
{
kgId
:
item
.
kgId
}
applicationAccess
ApiManage
.
delete
(
this
,
params
)
.
delete
(
this
,
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
$message
.
success
(
'删除成功'
)
this
.
refresh
()
this
.
refresh
()
})
})
.
catch
((
e
)
=>
{
.
catch
((
e
)
=>
{
console
.
log
(
e
)
console
.
log
(
e
)
})
})
})
})
},
},
refresh
(
reloadData
=
false
)
{
refresh
(
reloadData
=
false
)
{
if
(
reloadData
)
{
if
(
reloadData
)
{
this
.
myDataSetPage
.
tableData
.
impl
.
refreshTable
(
true
,
1
)
this
.
myDataSetPage
.
tableData
.
impl
.
refreshTable
(
true
,
1
)
}
else
{
}
else
{
this
.
myDataSetPage
.
tableData
.
impl
.
refreshTable
()
this
.
myDataSetPage
.
tableData
.
impl
.
refreshTable
()
}
}
},
},
onReset
()
{
onReset
()
{
this
.
$refs
.
myDataSetPage
.
resetFields
()
this
.
$refs
.
myDataSetPage
.
resetFields
()
this
.
refresh
(
true
)
this
.
refresh
(
true
)
},
},
formInit
()
{
formInit
()
{
this
.
refresh
()
this
.
refresh
()
},
},
resize
(
e
)
{
resize
(
e
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
collapseHeight
=
e
?.
height
this
.
collapseHeight
=
e
?.
height
},
300
)
},
300
)
}
}
},
},
mounted
()
{
mounted
()
{
this
.
formInit
()
this
.
formInit
()
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
'@/assets/style/element-variables.scss'
;
@import
'@/assets/style/element-variables.scss'
;
.title
{
.title
{
font-size
:
16px
;
font-size
:
16px
;
}
}
.instructions
{
.instructions
{
background-color
:
white
;
background-color
:
white
;
width
:
100%
;
width
:
100%
;
padding
:
0px
20px
20px
20px
;
padding
:
0px
20px
20px
20px
;
height
:
180px
;
height
:
180px
;
.instructionsList
{
.instructionsList
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
justify-content
:
space-around
;
justify-content
:
space-around
;
.item
{
.item
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
}
}
.title
{
.title
{
color
:
$--color-text-primary
;
color
:
$--color-text-primary
;
font-size
:
16px
;
font-size
:
16px
;
font-weight
:
500
;
font-weight
:
500
;
margin-bottom
:
8px
;
margin-bottom
:
8px
;
}
}
.describe
{
.describe
{
color
:
$--color-text-secondary
;
color
:
$--color-text-secondary
;
margin-bottom
:
16px
;
margin-bottom
:
16px
;
}
}
.itemTitle
{
.itemTitle
{
color
:
$--color-text-primary
;
color
:
$--color-text-primary
;
font-size
:
16px
;
font-size
:
16px
;
font-weight
:
500
;
font-weight
:
500
;
margin-bottom
:
8px
;
margin-bottom
:
8px
;
}
}
.head-index
{
.head-index
{
font-size
:
24px
;
font-size
:
24px
;
color
:
#e8e9eb
;
color
:
#e8e9eb
;
line-height
:
32px
;
line-height
:
32px
;
}
}
.itemDescribe
{
.itemDescribe
{
width
:
170px
;
width
:
170px
;
color
:
$--color-text-secondary
;
color
:
$--color-text-secondary
;
}
}
.img
{
.img
{
height
:
72px
;
height
:
72px
;
width
:
140px
;
width
:
140px
;
}
}
}
}
.tableBox
{
.tableBox
{
background-color
:
white
;
background-color
:
white
;
width
:
100%
;
width
:
100%
;
padding
:
20px
;
padding
:
20px
;
overflow
:
auto
;
overflow
:
auto
;
.add
{
.add
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
}
}
div
/
deep
/
.el-collapse-item__content
{
div
/
deep
/
.el-collapse-item__content
{
padding-bottom
:
0
;
padding-bottom
:
0
;
}
}
div
/
deep
/
.el-collapse-item__header
{
div
/
deep
/
.el-collapse-item__header
{
padding-left
:
20px
;
padding-left
:
20px
;
}
}
</
style
>
</
style
>
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