Commit ae51aa5c authored by mhw's avatar mhw

Merge branch 'master' of http://192.168.0.35:3000/lmp/lmp_web

parents b2839d72 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/applicationAccess/list', 'post', params, axiosOption, httpOption); return sender.doUrl('/admin/app/apiManage/list', 'post', params, axiosOption, httpOption);
} }
static view (sender, params, axiosOption, httpOption) { static view (sender, params, axiosOption, httpOption) {
return sender.doUrl('/admin/app/applicationAccess/view', 'get', params, axiosOption, httpOption); return sender.doUrl('/admin/app/apiManage/view', 'get', params, axiosOption, httpOption);
} }
static add (sender, params, axiosOption, httpOption) { static add (sender, params, axiosOption, httpOption) {
return sender.doUrl('/admin/app/applicationAccess/add', 'post', params, axiosOption, httpOption); return sender.doUrl('/admin/app/apiManage/add', 'post', params, axiosOption, httpOption);
} }
static update (sender, params, axiosOption, httpOption) { static update (sender, params, axiosOption, httpOption) {
return sender.doUrl('/admin/app/applicationAccess/update', 'post', params, axiosOption, httpOption); return sender.doUrl('/admin/app/apiManage/update', 'post', params, axiosOption, httpOption);
} }
static delete (sender, params, axiosOption, httpOption) { static delete (sender, params, axiosOption, httpOption) {
return sender.doUrl('/admin/app/applicationAccess/delete', 'post', params, axiosOption, httpOption); return sender.doUrl('/admin/app/apiManage/delete', 'post', params, axiosOption, httpOption);
} }
} }
...@@ -21,6 +21,7 @@ import KnowledgeGraph from './GptController/KnowledgeGraph.js'; ...@@ -21,6 +21,7 @@ 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 applicationAccess from './GptController/applicationAccess.js'
import plugOrchestration from './GptController/plugOrchestration.js'; import plugOrchestration from './GptController/plugOrchestration.js';
import ApiManage from './GptController/ApiManage.js';
export { export {
TemplateController, TemplateController,
...@@ -45,4 +46,5 @@ export { ...@@ -45,4 +46,5 @@ export {
DataSetCleaning, DataSetCleaning,
applicationAccess, applicationAccess,
plugOrchestration plugOrchestration
ApiManage
} }
...@@ -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: 'applicationAccess', component: _import('gptTraining/modelService/applicationAccess/index'), name: 'applicationAccess', props: getProps, meta: { title: '应用接入' } }, { path: 'apiManage', 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: '调用统计' } },
{ path: 'plugOrchestration', component: _import('gptTraining/modelService/plugOrchestration/index'), name: 'plugOrchestration', props: getProps, meta: { title: '插件编排' } }, { path: 'plugOrchestration', component: _import('gptTraining/modelService/plugOrchestration/index'), name: 'plugOrchestration', props: getProps, meta: { title: '插件编排' } },
......
<!-- 基本信息--> <!-- 基本信息-->
<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="applicationAccessDto.applicationName"> <el-form-item label="应用名称:" prop="apiManageDto.apiName">
<el-input v-model="form.applicationAccessDto.applicationName" class="inputWidth" :size="defaultFormItemSize"></el-input> <el-input v-model="form.apiManageDto.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.applicationAccessDto.applicationDescribe" type="textarea" class="inputWidth" :rows="5" :size="defaultFormItemSize"></el-input> <el-input v-model="form.apiManageDto.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: {
applicationAccessDto: { apiManageDto: {
applicationDescribe: '', remark: '',
applicationName: '' apiName: ''
} }
}, },
rules: { rules: {
'applicationAccessDto.applicationName': [{ required: true, message: '请输入应用名称', trigger: 'blur' }] 'apiManageDto.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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment