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
ae51aa5c
Commit
ae51aa5c
authored
May 09, 2024
by
mhw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://192.168.0.35:3000/lmp/lmp_web
parents
b2839d72
2f8a418d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
401 additions
and
378 deletions
+401
-378
ApiManage.js
src/api/GptController/ApiManage.js
+21
-0
gptController.js
src/api/gptController.js
+2
-0
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 @
ae51aa5c
export
default
class
applicationAccess
{
static
list
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/list'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
view
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/view'
,
'get'
,
params
,
axiosOption
,
httpOption
);
}
static
add
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/add'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
update
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/update'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
delete
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
plicationAccess/delete'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
}
export
default
class
ApiManage
{
static
list
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
iManage/list'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
view
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
iManage/view'
,
'get'
,
params
,
axiosOption
,
httpOption
);
}
static
add
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
iManage/add'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
update
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
iManage/update'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
static
delete
(
sender
,
params
,
axiosOption
,
httpOption
)
{
return
sender
.
doUrl
(
'/admin/app/ap
iManage/delete'
,
'post'
,
params
,
axiosOption
,
httpOption
);
}
}
src/api/gptController.js
View file @
ae51aa5c
...
...
@@ -21,6 +21,7 @@ import KnowledgeGraph from './GptController/KnowledgeGraph.js';
import
DataSetCleaning
from
'./GptController/DataSetCleaning.js'
;
import
applicationAccess
from
'./GptController/applicationAccess.js'
import
plugOrchestration
from
'./GptController/plugOrchestration.js'
;
import
ApiManage
from
'./GptController/ApiManage.js'
;
export
{
TemplateController
,
...
...
@@ -45,4 +46,5 @@ export {
DataSetCleaning
,
applicationAccess
,
plugOrchestration
ApiManage
}
src/router/systemRouters.js
View file @
ae51aa5c
...
...
@@ -56,7 +56,7 @@ const routers = [
{
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
:
'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
:
'callStatistics'
,
component
:
_import
(
'gptTraining/modelService/callStatistics/index'
),
name
:
'callStatistics'
,
props
:
getProps
,
meta
:
{
title
:
'调用统计'
}
},
{
path
:
'plugOrchestration'
,
component
:
_import
(
'gptTraining/modelService/plugOrchestration/index'
),
name
:
'plugOrchestration'
,
props
:
getProps
,
meta
:
{
title
:
'插件编排'
}
},
...
...
src/views/gptTraining/modelService/ap
plicationAccess
/dialog/editOrAdd.vue
→
src/views/gptTraining/modelService/ap
iManage
/dialog/editOrAdd.vue
View file @
ae51aa5c
<!-- 基本信息-->
<
template
>
<el-form
label-position=
"left"
ref=
"form"
label-width=
"100px"
:model=
"form"
:size=
"defaultFormItemSize"
:rules=
"rules"
>
<el-row
class=
"title"
>
基本信息
</el-row>
<el-form-item
label=
"应用名称:"
prop=
"ap
plicationAccessDto.applicationName"
>
<el-input
v-model=
"form.ap
plicationAccessDto.applicationName"
class=
"inputWidth"
:size=
"defaultFormItemSize"
></el-input>
<el-row>
<span
class=
"introduce"
>
支持中英文、数字、下划线(_),2-20个字符,不能以下划线为开头
</span></el-row>
</el-form-item>
<el-form-item
label=
"应用描述:"
>
<el-input
v-model=
"form.ap
plicationAccessDto.applicationDescribe"
type=
"textarea"
class=
"inputWidth"
:rows=
"5"
:size=
"defaultFormItemSize"
></el-input>
</el-form-item>
<el-row
type=
"flex"
justify=
"end"
class=
"dialog-btn-layer mt20"
>
<el-button
:size=
"defaultFormItemSize"
:plain=
"true"
@
click=
"onCancel(false)"
>
取消
</el-button>
<el-button
type=
"primary"
:size=
"defaultFormItemSize"
@
click=
"onSubmit"
>
确定
</el-button>
</el-row>
</el-form>
</
template
>
<
script
>
import
{
applicationAccess
}
from
'@/api/gptController.js'
export
default
{
data
()
{
return
{
taskList
:
[],
runNameList
:
[],
form
:
{
ap
plicationAccessDto
:
{
applicationDescribe
:
''
,
ap
plicationName
:
''
}
},
rules
:
{
'ap
plicationAccessDto.applicationName'
:
[{
required
:
true
,
message
:
'请输入应用名称'
,
trigger
:
'blur'
}]
}
}
},
props
:
[
'isEdit'
,
'item'
],
components
:
{},
computed
:
{},
mounted
()
{
this
.
intFrom
()
this
.
getTaskList
()
// this.getTuningRun()
},
methods
:
{
intFrom
()
{
this
.
form
=
{
...
this
.
form
,
...
this
.
item
}
try
{
this
.
form
.
templateLabel
=
JSON
.
parse
(
this
.
item
.
templateLabel
)
}
catch
(
error
)
{
// console.log(error);
}
},
onCancel
(
isSuccess
)
{
if
(
this
.
observer
!=
null
)
{
this
.
observer
.
cancel
(
isSuccess
)
}
},
onSubmit
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
params
=
{}
params
=
{
...
this
.
form
}
if
(
this
.
isEdit
)
{
applicationAccess
.
update
(
this
,
params
)
.
then
((
res
)
=>
{
resolve
(
res
)
this
.
$message
.
success
(
'编辑成功'
)
this
.
onCancel
(
true
)
})
.
catch
((
e
)
=>
{
reject
(
e
)
})
}
else
{
applicationAccess
.
add
(
this
,
params
)
.
then
((
res
)
=>
{
resolve
(
res
)
this
.
$message
.
success
(
'添加成功'
)
this
.
onCancel
(
true
)
})
.
catch
((
e
)
=>
{
reject
(
e
)
})
}
}
else
{
// reject();
}
})
})
}
}
}
</
script
>
<
style
scoped
>
.inputWidth
{
width
:
600px
;
}
.title
{
font-size
:
20px
;
margin-bottom
:
16px
;
}
.introduce
{
font-size
:
12px
;
color
:
#909399
;
}
</
style
>
<!-- 基本信息-->
<
template
>
<el-form
label-position=
"left"
ref=
"form"
label-width=
"100px"
:model=
"form"
:size=
"defaultFormItemSize"
:rules=
"rules"
>
<el-row
class=
"title"
>
基本信息
</el-row>
<el-form-item
label=
"应用名称:"
prop=
"ap
iManageDto.apiName"
>
<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-form-item>
<el-form-item
label=
"应用描述:"
>
<el-input
v-model=
"form.ap
iManageDto.remark"
type=
"textarea"
class=
"inputWidth"
:rows=
"5"
:size=
"defaultFormItemSize"
></el-input>
</el-form-item>
<el-row
type=
"flex"
justify=
"end"
class=
"dialog-btn-layer mt20"
>
<el-button
:size=
"defaultFormItemSize"
:plain=
"true"
@
click=
"onCancel(false)"
>
取消
</el-button>
<el-button
type=
"primary"
:size=
"defaultFormItemSize"
@
click=
"onSubmit"
>
确定
</el-button>
</el-row>
</el-form>
</
template
>
<
script
>
import
{
ApiManage
}
from
'@/api/gptController.js'
export
default
{
data
()
{
return
{
taskList
:
[],
runNameList
:
[],
form
:
{
ap
iManageDto
:
{
remark
:
''
,
ap
iName
:
''
}
},
rules
:
{
'ap
iManageDto.apiName'
:
[{
required
:
true
,
message
:
'请输入应用名称'
,
trigger
:
'blur'
}]
}
}
},
props
:
[
'isEdit'
,
'item'
],
components
:
{},
computed
:
{},
mounted
()
{
this
.
intFrom
()
this
.
getTaskList
()
// this.getTuningRun()
},
methods
:
{
intFrom
()
{
this
.
form
=
{
...
this
.
form
,
...
this
.
item
}
try
{
this
.
form
.
templateLabel
=
JSON
.
parse
(
this
.
item
.
templateLabel
)
}
catch
(
error
)
{
// console.log(error);
}
},
onCancel
(
isSuccess
)
{
if
(
this
.
observer
!=
null
)
{
this
.
observer
.
cancel
(
isSuccess
)
}
},
onSubmit
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
params
=
{}
params
=
{
...
this
.
form
}
if
(
this
.
isEdit
)
{
ApiManage
.
update
(
this
,
params
)
.
then
((
res
)
=>
{
resolve
(
res
)
this
.
$message
.
success
(
'编辑成功'
)
this
.
onCancel
(
true
)
})
.
catch
((
e
)
=>
{
reject
(
e
)
})
}
else
{
ApiManage
.
add
(
this
,
params
)
.
then
((
res
)
=>
{
resolve
(
res
)
this
.
$message
.
success
(
'添加成功'
)
this
.
onCancel
(
true
)
})
.
catch
((
e
)
=>
{
reject
(
e
)
})
}
}
else
{
// reject();
}
})
})
}
}
}
</
script
>
<
style
scoped
>
.inputWidth
{
width
:
600px
;
}
.title
{
font-size
:
20px
;
margin-bottom
:
16px
;
}
.introduce
{
font-size
:
12px
;
color
:
#909399
;
}
</
style
>
src/views/gptTraining/modelService/ap
plicationAccess
/index.vue
→
src/views/gptTraining/modelService/ap
iManage
/index.vue
View file @
ae51aa5c
This diff is collapsed.
Click to expand it.
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