diff --git a/src/api/vi/corpus.js b/src/api/vi/corpus.js index 04716d1..4e2ed46 100644 --- a/src/api/vi/corpus.js +++ b/src/api/vi/corpus.js @@ -1,77 +1,77 @@ -import request from '@/utils/request' -import { method } from 'lodash' +import request from "@/utils/request"; +import { method } from "lodash"; // 查询语料库列表 export function listCorpus(query) { return request({ - url: '/vi/corpus/single/list', - method: 'get', - params: query - }) + url: "/vi/corpus/single/list", + method: "post", + data: query, + }); } // 查询语料库详细 export function getCorpus(corpusId) { return request({ - url: '/vi/corpus/' + corpusId, - method: 'get' - }) + url: "/vi/corpus/" + corpusId, + method: "get", + }); } // 新增语料库 export function addCorpus(data) { return request({ - url: '/vi/corpus', - method: 'post', - data: data - }) + url: "/vi/corpus", + method: "post", + data: data, + }); } // 修改语料库 export function updateCorpus(data) { return request({ - url: '/vi/corpus', - method: 'put', - data: data - }) + url: "/vi/corpus", + method: "put", + data: data, + }); } // 删除语料库 export function delCorpus(corpusId) { return request({ - url: '/vi/corpus/' + corpusId, - method: 'delete' - }) + url: "/vi/corpus/" + corpusId, + method: "delete", + }); } export function batchAddCorpus(data) { return request({ - url: '/vi/corpus/continuous/insert', - method: 'post', - data: data - }) + url: "/vi/corpus/continuous/insert", + method: "post", + data: data, + }); } export function batchUpdateCorpus(data) { return request({ - url: '/vi/corpus/continuous/update', - method: 'post', - data: data - }) + url: "/vi/corpus/continuous/update", + method: "post", + data: data, + }); } export function getBatchCorpus(query) { return request({ - url: '/vi/corpus/continuous/list', - method: 'get', - params: query - }) + url: "/vi/corpus/continuous/list", + method: "post", + data: query, + }); } export function deleteBatchCorpus(corpusIds) { return request({ url: `/vi/corpus/continuous`, - method: 'delete', - data: corpusIds - }) -} \ No newline at end of file + method: "delete", + data: corpusIds, + }); +} diff --git a/src/api/vi/plan.js b/src/api/vi/plan.js new file mode 100644 index 0000000..73f0f0e --- /dev/null +++ b/src/api/vi/plan.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询语音交互-方案列表 +export function listScheme(query) { + return request({ + url: '/vi/scheme/list', + method: 'get', + params: query + }) +} + +// 查询语音交互-方案详细 +export function getScheme(schemeId) { + return request({ + url: '/vi/scheme/' + schemeId, + method: 'get' + }) +} + +// 新增语音交互-方案 +export function addScheme(data) { + return request({ + url: '/vi/scheme', + method: 'post', + data: data + }) +} + +// 修改语音交互-方案 +export function updateScheme(data) { + return request({ + url: '/vi/scheme', + method: 'put', + data: data + }) +} + +// 删除语音交互-方案 +export function delScheme(schemeId) { + return request({ + url: '/vi/scheme/' + schemeId, + method: 'delete' + }) +} diff --git a/src/api/vi/project.js b/src/api/vi/project.js new file mode 100644 index 0000000..0eddc50 --- /dev/null +++ b/src/api/vi/project.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询语音交互-项目列表 +export function listProject(query) { + return request({ + url: '/vi/project/list', + method: 'get', + params: query + }) +} + +// 查询语音交互-项目详细 +export function getProject(projectId) { + return request({ + url: '/vi/project/' + projectId, + method: 'get' + }) +} + +// 新增语音交互-项目 +export function addProject(data) { + return request({ + url: '/vi/project', + method: 'post', + data: data + }) +} + +// 修改语音交互-项目 +export function updateProject(data) { + return request({ + url: '/vi/project', + method: 'put', + data: data + }) +} + +// 删除语音交互-项目 +export function delProject(projectId) { + return request({ + url: '/vi/project/' + projectId, + method: 'delete' + }) +} diff --git a/src/components/TableSearch/index.vue b/src/components/TableSearch/index.vue index 9ef5b2a..496fba6 100644 --- a/src/components/TableSearch/index.vue +++ b/src/components/TableSearch/index.vue @@ -1,74 +1,69 @@ - - - - - + + + + + diff --git a/src/hooks/tableHeight.ts b/src/hooks/tableHeight.ts new file mode 100644 index 0000000..f254147 --- /dev/null +++ b/src/hooks/tableHeight.ts @@ -0,0 +1,21 @@ +import { useElementSize } from '@vueuse/core' +import { computed } from 'vue' + +/** + * 监听容器高度变化的hook + * @param {Ref} containerRef - 容器的ref引用 + * @param {boolean} [immediate=true] - 是否立即执行一次 + * @returns {Ref} 容器的高度 + */ +export function useContainerHeight(containerRef, immediate = true) { + // 存储容器高度的响应式变量 + + const { height } = useElementSize(containerRef) + const containerHeight = computed(() => { + let offset = height.value + 84 + return { height: `calc(100% - ${offset}px)` } + }) + + + return containerHeight; +} diff --git a/src/router/index.js b/src/router/index.js index bb8d9b7..178490d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -192,6 +192,20 @@ export const dynamicRoutes = [ }, ], }, + { + path: "/vi/plan", + component: Layout, + hidden: true, + permissions: ["vi:testProject:list"], + children: [ + { + path: "index/:id", + component: () => import("@/views/vi/testProject/plan/index"), + name: "Data", + meta: { title: "方案管理", activeMenu: "/vi/testProject" }, + }, + ], + }, { path: "/monitor/job-log", component: Layout, @@ -221,7 +235,7 @@ export const dynamicRoutes = [ ], }, ]; -console.log("constantRoutes", constantRoutes); + const router = createRouter({ history: createWebHistory(), routes: constantRoutes, diff --git a/src/views/test/configs/index.vue b/src/views/test/configs/index.vue index 195a17a..5d18a44 100644 --- a/src/views/test/configs/index.vue +++ b/src/views/test/configs/index.vue @@ -1,541 +1,696 @@ - - - - - + + + + + diff --git a/src/views/test/detect/index.vue b/src/views/test/detect/index.vue index fbe871f..f0722b9 100644 --- a/src/views/test/detect/index.vue +++ b/src/views/test/detect/index.vue @@ -1,371 +1,445 @@ - - - + + + diff --git a/src/views/test/log/index.vue b/src/views/test/log/index.vue index 4b09927..7859d10 100644 --- a/src/views/test/log/index.vue +++ b/src/views/test/log/index.vue @@ -1,388 +1,450 @@ - - - + + + diff --git a/src/views/vi/corpus/awaken/index.vue b/src/views/vi/corpus/awaken/index.vue index 68f46d3..e8859cc 100644 --- a/src/views/vi/corpus/awaken/index.vue +++ b/src/views/vi/corpus/awaken/index.vue @@ -1,133 +1,28 @@ diff --git a/src/views/vi/corpus/test/MultipleConversations/index.vue b/src/views/vi/corpus/test/MultipleConversations/index.vue index fb07069..f78ad8d 100644 --- a/src/views/vi/corpus/test/MultipleConversations/index.vue +++ b/src/views/vi/corpus/test/MultipleConversations/index.vue @@ -1,168 +1,173 @@