From 990fc81b375c88c7d21ec766c18dfa217a0c50da Mon Sep 17 00:00:00 2001 From: ann Date: Tue, 3 Sep 2024 16:47:29 +0800 Subject: [PATCH] fix --- public/locales/en.json | 3 +- public/locales/zh.json | 3 +- src/api/task/task.js | 10 + src/router/modules/taskManagement.js | 7 + .../taskManagement/aiList/createInstance.vue | 223 ++++++++++++++++++ src/views/taskManagement/aiList/taskList.vue | 2 +- 6 files changed, 245 insertions(+), 3 deletions(-) create mode 100644 src/views/taskManagement/aiList/createInstance.vue diff --git a/public/locales/en.json b/public/locales/en.json index 5280de8..3c7937c 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -563,6 +563,7 @@ "operation": "Single Operation", "allOperation": "All Operation", "selectInstance": "Select Instance", - "selectSubInstance": "Select SubInstance" + "selectSubInstance": "Select SubInstance", + "instanceDes": "Instance Description" } } \ No newline at end of file diff --git a/public/locales/zh.json b/public/locales/zh.json index 990816e..2ccd924 100644 --- a/public/locales/zh.json +++ b/public/locales/zh.json @@ -563,6 +563,7 @@ "operation": "单独操作", "allOperation": "全部操作", "selectInstance": "选择主实例", - "selectSubInstance": "选择子实例" + "selectSubInstance": "选择子实例", + "instanceDes": "实例描述" } } \ No newline at end of file diff --git a/src/api/task/task.js b/src/api/task/task.js index 8ba1d12..d3c59d3 100644 --- a/src/api/task/task.js +++ b/src/api/task/task.js @@ -67,6 +67,13 @@ export const addDeductiveTextTask = (data) => { data }) } +export const createDeployTask = (data) => { + return request({ + url: '/pcm/v1/inference/createDeployTask', + method: 'post', + data + }) +} export const chatApi = (data) => { return request({ @@ -85,6 +92,9 @@ export const getModelName = (type) => { return request({ url: '/pcm/v1/inference/modelNames?type=' + type, method: 'get' }) } +export const getClustersByModel = (params) => { + return request({ url: '/pcm/v1/inference/getAdaptersByModel', method: 'get', params }) +} export const getInstanceListByModelType = (params) => { return request({ url: '/pcm/v1/inference/getDeployTasksByType', method: 'get', params }) } diff --git a/src/router/modules/taskManagement.js b/src/router/modules/taskManagement.js index a87c3af..e0e6dcd 100644 --- a/src/router/modules/taskManagement.js +++ b/src/router/modules/taskManagement.js @@ -15,6 +15,13 @@ const taskManagementRouter = { meta: { activeMenu: '/taskManagement/taskList' }, hidden: true }, + { + path: 'createInstance', + component: () => import('@/views/taskManagement/aiList/createInstance'), + name: 'createInstance', + meta: { activeMenu: '/taskManagement/taskList' }, + hidden: true + }, { path: 'detail', component: () => import('@/views/taskManagement/taskList/detail'), diff --git a/src/views/taskManagement/aiList/createInstance.vue b/src/views/taskManagement/aiList/createInstance.vue new file mode 100644 index 0000000..5d109aa --- /dev/null +++ b/src/views/taskManagement/aiList/createInstance.vue @@ -0,0 +1,223 @@ + + + + + + diff --git a/src/views/taskManagement/aiList/taskList.vue b/src/views/taskManagement/aiList/taskList.vue index 41061d0..b419340 100644 --- a/src/views/taskManagement/aiList/taskList.vue +++ b/src/views/taskManagement/aiList/taskList.vue @@ -263,7 +263,7 @@ export default { this.$router.push({ path: `detail`, query: { id: row.id }}) }, createItem() { - this.$router.push({ path: `create` }) + this.$router.push({ path: `createInstance` }) }, handleClick() { console.log('switch')